Spaces:
Sleeping
Sleeping
Download tests/test_root.py from DvorakInnovationAI/GenAI-FASTAPI: direct link, hf CLI and curl.
- Browser
- Download file 257 Bytes
-
https://huggingface.co/spaces/DvorakInnovationAI/GenAI-FASTAPI/resolve/main/tests/test_root.py
- Command line
-
hf download hf://spaces/DvorakInnovationAI/GenAI-FASTAPI/tests/test_root.py
-
curl -L -o test_root.py https://huggingface.co/spaces/DvorakInnovationAI/GenAI-FASTAPI/resolve/main/tests/test_root.py
257 Bytes
| from fastapi.testclient import TestClient | |
| from api.main import app | |
| client = TestClient(app) | |
| def test_root(): | |
| response = client.get("/") | |
| assert response.status_code == 200 | |
| assert response.json() == {"response":"Hello"} | |