import pytest from httpx import ASGITransport, AsyncClient from app.main import app @pytest.mark.asyncio async def test_health(): async with AsyncClient(transport=ASGITransport(app=app), base_url="http://test") as c: r = await c.get("/health") assert r.status_code == 200 assert r.json() == {"status": "ok"}