test_health.py 409 B

123456789101112131415
  1. from fastapi.testclient import TestClient
  2. from app.main import app
  3. def test_live_health_reports_project_identity() -> None:
  4. response = TestClient(app).get("/api/v1/system/health/live")
  5. assert response.status_code == 200
  6. assert response.json()["data"] == {
  7. "status": "alive",
  8. "project": "智保通",
  9. "stage": "s1",
  10. }
  11. assert response.json()["meta"]["request_id"]