"""Tests for the health check endpoints.""" def test_health_returns_200_ok(client) -> None: response = client.get("/health") assert response.status_code == 200 def test_health_returns_expected_json_structure(client) -> None: payload = client.get("/health").json() assert payload["status"] == "ok" assert "version" in payload def test_api_v1_health_returns_200_ok(client) -> None: """The alternative health path ``/api/v1/health`` must behave the same.""" response = client.get("/api/v1/health") assert response.status_code == 200 payload = response.json() assert payload["status"] == "ok" assert "version" in payload def test_unknown_route_returns_standardized_error(client) -> None: response = client.get("/api/v1/does-not-exist") assert response.status_code == 404 payload = response.json() assert payload["code"] == "not_found" assert "detail" in payload