mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2026-01-17 11:40:39 +03:00
refactor: remove unnecessary await from database session commit in client fixture
This commit is contained in:
@@ -80,14 +80,13 @@ async def db_session():
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
async def client(db_session) -> AsyncGenerator[AsyncClient, Any]: # noqa: ARG001
|
||||
async def client(db_session) -> AsyncGenerator[AsyncClient, Any]:
|
||||
transport = ASGITransport(
|
||||
app=app,
|
||||
)
|
||||
|
||||
async def override_get_db():
|
||||
yield db_session
|
||||
await db_session.commit()
|
||||
|
||||
async with AsyncClient(
|
||||
base_url="http://testserver/v1",
|
||||
|
||||
Reference in New Issue
Block a user