mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-11-30 13:20:40 +03:00
move await engine.dispose() to test client
This commit is contained in:
@@ -32,3 +32,6 @@ async def client() -> AsyncClient:
|
||||
) as client:
|
||||
await start_db()
|
||||
yield client
|
||||
# for AsyncEngine created in function scope, close and
|
||||
# clean-up pooled connections
|
||||
await engine.dispose()
|
||||
|
||||
Reference in New Issue
Block a user