From b474e21f0ffb2db2fd8a45ec573ff7fa23257288 Mon Sep 17 00:00:00 2001 From: pi3c Date: Sat, 27 Jan 2024 14:43:46 +0300 Subject: [PATCH] sync --- tests/conftest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 104274b..60a60f5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -50,3 +50,11 @@ def app(): app = create_app() app.dependency_overrides[get_async_session] = get_test_session yield app + + +@pytest_asyncio.fixture(scope="session") +async def client(app): + async with AsyncClient( + app=app, base_url="http://localhost:8000/api/v1/menus", + ) as async_client: + yield async_client