- import pytest
- @pytest.mark.asyncio
- async def test_health_returns_ok(client):
- response = await client.get("/api/health")
- assert response.status_code == 200
- data = await response.get_json()
- assert data["code"] == 0
- assert data["data"]["status"] == "healthy"
|