| 12345678910111213141516171819202122 |
- from fastapi.testclient import TestClient
- from app.main import app
- def test_health() -> None:
- with TestClient(app) as client:
- response = client.get("/health")
- assert response.status_code == 200
- payload = response.json()
- assert payload["status"] == "ok"
- assert payload["database"]["dialect"] == "sqlite"
- assert payload["agent"]["framework"] == "deepagents"
- def test_frontend_app_mount() -> None:
- with TestClient(app) as client:
- response = client.get("/app/")
- assert response.status_code == 200
- assert response.headers["content-type"].startswith("text/html")
- assert "./api.js" in response.text
- assert "./app.js" in response.text
|