15 lines
397 B
Python
15 lines
397 B
Python
import pytest
|
|
from httpx import AsyncClient
|
|
|
|
from app.config import settings
|
|
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_health_returns_ok(client: AsyncClient) -> None:
|
|
response = await client.get("/health")
|
|
assert response.status_code == 200
|
|
data = response.json()
|
|
assert data["status"] == "ok"
|
|
assert data["service"] == settings.app_name
|
|
assert data["database"] == "connected"
|