fix(tests): fixed test runtime errors regarding database connection

This commit is contained in:
ribardej
2025-11-11 15:05:44 +01:00
parent 1da927dc07
commit ff9cc712db
2 changed files with 4 additions and 1 deletions

View File

@@ -19,8 +19,9 @@ def fastapi_app():
return app
@pytest.fixture(scope="session")
@pytest.fixture(scope="function")
def client(fastapi_app):
# Function-scoped to avoid leaking loop-bound resources into async tests
return TestClient(fastapi_app, raise_server_exceptions=True)