import os # Set required env vars before any app module is imported. # Settings() is instantiated at module level in config.py, so these must # be present before collection starts. _TEST_DEFAULTS = { "APP_ENV": "test", "JWT_SECRET": "test-jwt-secret-at-least-32-chars-long", "MONGODB_URI": "mongodb://localhost:27017/test_accessible_video", "REDIS_URL": "redis://localhost:6379/1", "GCP_PROJECT_ID": "test-gcp-project", "GCS_BUCKET": "test-bucket", "GEMINI_API_KEY": "test-gemini-key", "CLIENT_BASE_URL": "http://localhost:3000", } for key, value in _TEST_DEFAULTS.items(): os.environ.setdefault(key, value)