fastfood_two/tests/e2e_tests/conftest.py

14 lines
303 B
Python

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