Browse Source

dispose of engine to avoid resource warning

pull/14165/head
svlandeg 9 months ago
parent
commit
e85bfdf026
  1. 2
      tests/test_tutorial/test_sql_databases/test_tutorial001.py
  2. 2
      tests/test_tutorial/test_sql_databases/test_tutorial002.py

2
tests/test_tutorial/test_sql_databases/test_tutorial001.py

@ -45,6 +45,8 @@ def get_client(request: pytest.FixtureRequest):
with TestClient(mod.app) as c:
yield c
# Clean up connection explicitely to avoid resource warning
mod.engine.dispose()
def test_crud_app(client: TestClient):

2
tests/test_tutorial/test_sql_databases/test_tutorial002.py

@ -45,6 +45,8 @@ def get_client(request: pytest.FixtureRequest):
with TestClient(mod.app) as c:
yield c
# Clean up connection explicitely to avoid resource warning
mod.engine.dispose()
def test_crud_app(client: TestClient):

Loading…
Cancel
Save