Spaces:
Running
Running
| import pytest | |
| from asgi_lifespan import LifespanManager | |
| from httpx import AsyncClient, ASGITransport | |
| from main import app | |
| async def client(): | |
| async with LifespanManager(app): | |
| async with AsyncClient(transport=ASGITransport(app=app), base_url="http://test") as c: | |
| yield c | |