test_health.py 279 B

1234567891011
  1. import pytest
  2. @pytest.mark.asyncio
  3. async def test_health_returns_ok(client):
  4. response = await client.get("/api/health")
  5. assert response.status_code == 200
  6. data = await response.get_json()
  7. assert data["code"] == 0
  8. assert data["data"]["status"] == "healthy"