Spaces:
Sleeping
Sleeping
| from fastapi.testclient import TestClient | |
| from app.main import app | |
| client = TestClient(app) | |
| def test_health() -> None: | |
| response = client.get("/api/health") | |
| assert response.status_code == 200 | |
| assert response.json()["ok"] is True | |
| def test_home_and_sample() -> None: | |
| assert client.get("/").status_code == 200 | |
| sample = client.get("/api/sample") | |
| assert sample.status_code == 200 | |
| assert "half-cent" in sample.json()["issue"] | |