Skip to content

Commit

Permalink
refactor: 単体 API E2E テスト vol.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tarepan committed Mar 9, 2024
1 parent 58941f1 commit bff85e5
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/e2e/single_api/test_core_versions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""
/core_versions API のテスト
"""

from fastapi.testclient import TestClient


def test_get_core_versions_200(client: TestClient) -> None:
response = client.get("/core_versions", params={})
assert response.status_code == 200
10 changes: 10 additions & 0 deletions test/e2e/single_api/test_initialize_speaker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""
/initialize_speaker API のテスト
"""

from fastapi.testclient import TestClient


def test_post_initialize_speaker_204(client: TestClient) -> None:
response = client.post("/initialize_speaker", params={"speaker": 0})
assert response.status_code == 204
10 changes: 10 additions & 0 deletions test/e2e/single_api/test_is_initialized_speaker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""
/is_initialized_speaker API のテスト
"""

from fastapi.testclient import TestClient


def test_get_is_initialized_speaker_200(client: TestClient) -> None:
response = client.get("/is_initialized_speaker", params={"speaker": 0})
assert response.status_code == 200
10 changes: 10 additions & 0 deletions test/e2e/single_api/test_singer_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""
/singer_info API のテスト
"""

from fastapi.testclient import TestClient


def test_get_singer_info_200(client: TestClient) -> None:
response = client.get("/singer_info", params={"speaker_uuid": "b1a81618-b27b-40d2-b0ea-27a9ad408c4b"})
assert response.status_code == 200
10 changes: 10 additions & 0 deletions test/e2e/single_api/test_singers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""
/singers API のテスト
"""

from fastapi.testclient import TestClient


def test_get_singers_200(client: TestClient) -> None:
response = client.get("/singers", params={})
assert response.status_code == 200
10 changes: 10 additions & 0 deletions test/e2e/single_api/test_speaker_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""
/speaker_info API のテスト
"""

from fastapi.testclient import TestClient


def test_get_speaker_info_200(client: TestClient) -> None:
response = client.get("/speaker_info", params={"speaker_uuid": "388f246b-8c41-4ac1-8e2d-5d79f3ff56d9"})
assert response.status_code == 200
10 changes: 10 additions & 0 deletions test/e2e/single_api/test_speakers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""
/speakers API のテスト
"""

from fastapi.testclient import TestClient


def test_get_speakers_200(client: TestClient) -> None:
response = client.get("/speakers", params={})
assert response.status_code == 200
10 changes: 10 additions & 0 deletions test/e2e/single_api/test_supported_devices.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""
/supported_devices API のテスト
"""

from fastapi.testclient import TestClient


def test_get_supported_devices_200(client: TestClient) -> None:
response = client.get("/supported_devices", params={})
assert response.status_code == 200
10 changes: 10 additions & 0 deletions test/e2e/single_api/test_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""
/version API のテスト
"""

from fastapi.testclient import TestClient


def test_get_version_200(client: TestClient) -> None:
response = client.get("/version", params={})
assert response.status_code == 200

0 comments on commit bff85e5

Please sign in to comment.