import pytest from httpx import ASGITransport, AsyncClient from router.router import app @pytest.mark.anyio async def test_healthz_reports_db_and_redis(): async with AsyncClient(transport=ASGITransport(app=app), base_url="http://test") as client: res = await client.get("/healthz") body = res.json() assert res.status_code == 200 assert body["db"] is True assert body["redis"] is True