From 7c30a8bfe62d56e50a9fb4eac7e848da59d7e4e5 Mon Sep 17 00:00:00 2001 From: "Ivan Mladjenovic (He/Him)" Date: Thu, 12 Dec 2024 16:41:56 +0000 Subject: [PATCH] attempt to fix all tests by mocking openai in conftest --- backend/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/conftest.py b/backend/conftest.py index 2696e7db..9eab1170 100644 --- a/backend/conftest.py +++ b/backend/conftest.py @@ -10,7 +10,7 @@ def pytest_configure(config): os.environ["PYTEST_RUNNING"] = "1" -@pytest.fixture(autouse=True) +@pytest.fixture(scope="module", autouse=True) def mock_async_openai(): with patch("src.llm.OpenAI.client") as mock_async_openai: yield mock_async_openai