mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 06:57:47 +01:00
fix(tests): fixed test runtime errors regarding database connection
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user