From 94f34b70323c55cec9869f9b8e557d6d8199879b Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Thu, 3 Sep 2026 11:57:04 -0700 Subject: [PATCH] test(chatgpt): keep authenticator tests out of the real token directory --- .../test_litellm/llms/chatgpt/test_chatgpt_authenticator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_litellm/llms/chatgpt/test_chatgpt_authenticator.py b/tests/test_litellm/llms/chatgpt/test_chatgpt_authenticator.py index 861404e9157..833220e8a67 100644 --- a/tests/test_litellm/llms/chatgpt/test_chatgpt_authenticator.py +++ b/tests/test_litellm/llms/chatgpt/test_chatgpt_authenticator.py @@ -25,9 +25,9 @@ def _make_jwt(payload: dict) -> str: class TestChatGPTAuthenticator: @pytest.fixture - def authenticator(self): - with patch("os.path.exists", return_value=True): - return Authenticator() + def authenticator(self, tmp_path, monkeypatch): + monkeypatch.setenv("CHATGPT_TOKEN_DIR", str(tmp_path)) + return Authenticator() def test_get_access_token_from_file(self, authenticator): future_time = time.time() + 3600