diff --git a/app/main.py b/app/main.py index 258897e1..11cb9410 100644 --- a/app/main.py +++ b/app/main.py @@ -48,6 +48,7 @@ SESSION_SECRET = ( settings.session_secret or "INSECURE_DEFAULT_FOR_DEVELOPMENT_ONLY_DO_NOT_USE_IN_PRODUCTION_MINIMUM_32_CHARS" ) + @asynccontextmanager async def lifespan(app: FastAPI): """ diff --git a/tests/test_main.py b/tests/test_main.py index f490d223..b59c2c93 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -120,7 +120,6 @@ class TestLifespanEvents: @pytest.mark.asyncio async def test_lifespan_calls_init_sentry_after_db_settings_load(self): """Test that init_sentry is called inside lifespan after load_settings_from_db.""" - from unittest.mock import call with ( patch("app.database.init_db"),