15 lines
375 B
Python
15 lines
375 B
Python
from fastapi.testclient import TestClient
|
|||
|
|
|
||
|
|
|
||
|
|
def test_health_returns_success(client: TestClient) -> None:
|
||
|
|
response = client.get("/health")
|
||
|
|
|
||
|
|
assert response.status_code == 200
|
||
|
|
assert response.json() == {"status": "ok"}
|
||
|
|
|
||
|
|
|
||
|
|
def test_unknown_route_returns_404(client: TestClient) -> None:
|
||
|
|
response = client.get("/not-exist")
|
||
|
|
|
||
|
|
assert response.status_code == 404
|