-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from fastapi.testclient import TestClient | ||
from run import generate_app | ||
|
||
from voicevox_engine.setting import SettingLoader | ||
from voicevox_engine.synthesis_engine import make_synthesis_engines | ||
from voicevox_engine.utility.core_version_utility import get_latest_core_version | ||
|
||
synthesis_engines = make_synthesis_engines(use_gpu=False) | ||
latest_core_version = get_latest_core_version(versions=synthesis_engines.keys()) | ||
setting_loader = SettingLoader("./e2e_test_setting.yml") | ||
|
||
client = TestClient( | ||
generate_app( | ||
synthesis_engines=synthesis_engines, | ||
latest_core_version=latest_core_version, | ||
setting_loader=setting_loader, | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from generate_test_client import client | ||
|
||
from voicevox_engine import __version__ | ||
|
||
|
||
def test_fetch_version_success(): | ||
response = client.get("/version") | ||
assert response.status_code == 200 | ||
assert response.json() == __version__ |