|
from httpx import ASGITransport, AsyncClient
|
|
from pytest import fixture
|
|
|
|
|
|
@fixture
|
|
async def client(app):
|
|
transport = ASGITransport(app=app)
|
|
|
|
async with AsyncClient(
|
|
transport=transport,
|
|
base_url="http://127.0.0.1:8000/api/v1/",
|
|
) as async_client:
|
|
yield async_client
|