12 lines
290 B
Python
12 lines
290 B
Python
import pytest_asyncio
|
|
from httpx import ASGITransport, AsyncClient
|
|
|
|
|
|
@pytest_asyncio.fixture
|
|
async def api_client():
|
|
from src.main import app
|
|
|
|
transport = ASGITransport(app=app)
|
|
async with AsyncClient(transport=transport, base_url="http://test") as client:
|
|
yield client
|