fix(tests): Dispose SQLAlchemy engine in client fixture teardown

This commit is contained in:
Postnov Roman 2025-04-05 12:54:04 +03:00
parent 8e62206a78
commit 318e73a301
2 changed files with 4 additions and 0 deletions

View File

@ -47,6 +47,8 @@ def get_client(request: pytest.FixtureRequest):
with TestClient(mod.app) as c:
yield c
mod.engine.dispose()
def test_crud_app(client: TestClient):
# TODO: this warns that SQLModel.from_orm is deprecated in Pydantic v1, refactor

View File

@ -47,6 +47,8 @@ def get_client(request: pytest.FixtureRequest):
with TestClient(mod.app) as c:
yield c
mod.engine.dispose()
def test_crud_app(client: TestClient):
# TODO: this warns that SQLModel.from_orm is deprecated in Pydantic v1, refactor