2026-06-29 00:10:10 +02:00
|
|
|
"""Health endpoint test — AC 18."""
|
2026-06-03 23:52:05 +00:00
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
2026-06-29 00:10:10 +02:00
|
|
|
import pytest
|
2026-06-03 23:52:05 +00:00
|
|
|
from httpx import AsyncClient
|
|
|
|
|
|
|
|
|
|
|
2026-06-29 00:10:10 +02:00
|
|
|
@pytest.mark.asyncio
|
|
|
|
|
class TestHealth:
|
|
|
|
|
"""AC 18: GET /api/v1/health -> 200 without auth."""
|
2026-06-03 23:52:05 +00:00
|
|
|
|
2026-06-29 00:10:10 +02:00
|
|
|
async def test_health_returns_200_without_auth(self, client: AsyncClient):
|
|
|
|
|
"""AC 18: GET /api/v1/health -> 200 without auth."""
|
|
|
|
|
resp = await client.get("/api/v1/health")
|
|
|
|
|
assert resp.status_code == 200
|
|
|
|
|
data = resp.json()
|
|
|
|
|
assert data["status"] == "ok"
|
|
|
|
|
assert "version" in data
|