Spaces:
Sleeping
Sleeping
Download tests/test_api.py from rajvivan/CUD-Traffic-AI: direct link, hf CLI and curl.
- Browser
- Download file 238 Bytes
-
https://huggingface.co/spaces/rajvivan/CUD-Traffic-AI/resolve/main/tests/test_api.py
- Command line
-
hf download hf://spaces/rajvivan/CUD-Traffic-AI/tests/test_api.py
-
curl -L -o test_api.py https://huggingface.co/spaces/rajvivan/CUD-Traffic-AI/resolve/main/tests/test_api.py
238 Bytes
| from fastapi.testclient import TestClient | |
| from backend.main import app | |
| client = TestClient(app) | |
| def test_health(): | |
| response = client.get("/health") | |
| assert response.status_code == 200 | |
| assert response.json()["status"] == "ok" | |