| 12345678910111213141516 |
- import pytest
- from httpx import AsyncClient, ASGITransport
- from app.main import app
- @pytest.fixture
- async def client():
- transport = ASGITransport(app=app)
- async with AsyncClient(transport=transport, base_url="http://test") as ac:
- yield ac
- @pytest.fixture
- async def health_response(client):
- resp = await client.get("/health")
- return resp
|