Files
hms-licht-ton/backend/tests/test_health.py
T

17 lines
452 B
Python
Raw Normal View History

"""Tests for the health endpoint."""
import pytest
from httpx import AsyncClient
@pytest.mark.asyncio
async def test_health_returns_ok(client: AsyncClient):
"""GET /api/health should return 200 with status ok."""
response = await client.get("/api/health")
assert response.status_code == 200
data = response.json()
assert "status" in data
assert "db" in data
assert "redis" in data
assert data["redis"] == "connected"