first commit

This commit is contained in:
Anurag Jangid 2026-10-08 02:52:58 +05:30
commit 34ea15a54d
246 changed files with 18660 additions and 0 deletions

View file

@ -0,0 +1,19 @@
from fastapi.testclient import TestClient
from app.main import app
client = TestClient(app)
def test_health_endpoint() -> None:
response = client.get("/api/health")
assert response.status_code in (200, 503)
body = response.json()
assert body["service"] == "desi-clans-api"
assert "database" in body
assert body["status"] in ("ok", "degraded")
if response.status_code == 200:
assert body["database"] == "connected"
else:
assert body["database"] == "unavailable"