From 0a586d3d79673b43de717496be17972728f94695 Mon Sep 17 00:00:00 2001 From: Brylie Christopher Oxley Date: Sat, 6 Jul 2024 07:18:36 +0300 Subject: [PATCH] Fix tests --- tests/test_main.py | 3 +++ 1 file changed, 3 insertions(+) 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 = [