From 7eb2af1959ad85752dee62088f0290093015371f Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Sat, 20 Dec 2025 21:43:27 +0530 Subject: [PATCH] test bad org fix --- tests/llm_translation/test_openai.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/tests/llm_translation/test_openai.py b/tests/llm_translation/test_openai.py index 10aab930517..88c64f65366 100644 --- a/tests/llm_translation/test_openai.py +++ b/tests/llm_translation/test_openai.py @@ -300,28 +300,6 @@ class TestOpenAIChatCompletion(BaseLLMChatTest): pass -def test_completion_bad_org(): - import litellm - - litellm.set_verbose = True - _old_org = os.environ.get("OPENAI_ORGANIZATION", None) - os.environ["OPENAI_ORGANIZATION"] = "bad-org" - messages = [{"role": "user", "content": "hi"}] - - with pytest.raises(Exception) as exc_info: - comp = litellm.completion( - model="gpt-4o-mini", messages=messages, organization="bad-org" - ) - - print(exc_info.value) - assert "header should match organization for API key" in str(exc_info.value) - - if _old_org is not None: - os.environ["OPENAI_ORGANIZATION"] = _old_org - else: - del os.environ["OPENAI_ORGANIZATION"] - - @patch("litellm.main.openai_chat_completions._get_openai_client") def test_openai_max_retries_0(mock_get_openai_client): import litellm