]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
✅ Update tests, don't double dispose the engine (#15587)
authorSebastián Ramírez <tiangolo@gmail.com>
Sat, 23 May 2026 17:02:16 +0000 (19:02 +0200)
committerGitHub <noreply@github.com>
Sat, 23 May 2026 17:02:16 +0000 (17:02 +0000)
tests/test_tutorial/test_sql_databases/test_tutorial001.py
tests/test_tutorial/test_sql_databases/test_tutorial002.py

index cd6b3b11cfe5d7e0726bd347c0df70afc1028a09..787bb331631ff75f02019203a430e4970c215e47 100644 (file)
@@ -45,8 +45,6 @@ def get_client(request: pytest.FixtureRequest):
     # Clean up connection explicitly to avoid resource warning
     mod.engine.dispose()
 
-    mod.engine.dispose()
-
 
 def test_crud_app(client: TestClient):
     # TODO: this warns that SQLModel.from_orm is deprecated in Pydantic v1, refactor
index 8037d886fb8bdace9c8b0dae30592899cb2ab9d7..fb1c67922492aa3793800d9549eb92290a318bf6 100644 (file)
@@ -45,8 +45,6 @@ def get_client(request: pytest.FixtureRequest):
     # Clean up connection explicitly to avoid resource warning
     mod.engine.dispose()
 
-    mod.engine.dispose()
-
 
 def test_crud_app(client: TestClient):
     # TODO: this warns that SQLModel.from_orm is deprecated in Pydantic v1, refactor