diff --git a/tests/test_main.py b/tests/test_main.py index 71240078a..d138df975 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -36,6 +36,9 @@ def mock_services(monkeypatch): "app.main.get_chat_response_with_history", mock_get_chat_response_with_history ) + # Mock environment variable + monkeypatch.setenv("OPENAI_API_KEY", "test_api_key") + def test_sources_toggle_independent(mock_services): messages = [