diff --git a/tests/llm_translation/test_openai.py b/tests/llm_translation/test_openai.py index e76609dd6f..234d59fe96 100644 --- a/tests/llm_translation/test_openai.py +++ b/tests/llm_translation/test_openai.py @@ -308,7 +308,7 @@ def test_completion_bad_org(): ) print(exc_info.value) - assert "No such organization: bad-org" in str(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 diff --git a/tests/local_testing/test_completion.py b/tests/local_testing/test_completion.py index f4fed301c0..135be8f5b6 100644 --- a/tests/local_testing/test_completion.py +++ b/tests/local_testing/test_completion.py @@ -2134,7 +2134,7 @@ def test_completion_openai_organization(): ) pytest.fail("Request should have failed - This organization does not exist") except Exception as e: - assert "No such organization: org-ikDc4ex8NB" in str(e) + assert "header should match organization for API key" in str(e) except Exception as e: print(e) diff --git a/tests/local_testing/test_router_init.py b/tests/local_testing/test_router_init.py index 9b4e12f12c..af46d1dc87 100644 --- a/tests/local_testing/test_router_init.py +++ b/tests/local_testing/test_router_init.py @@ -448,7 +448,7 @@ async def test_openai_with_organization(sync_mode): ) except Exception as e: print("Got exception: " + str(e)) - assert "No such organization: org-ikDc4ex8NB" in str(e) + assert "header should match organization for API key" in str(e) # good org works response = router.completion( @@ -478,7 +478,7 @@ async def test_openai_with_organization(sync_mode): ) except Exception as e: print("Got exception: " + str(e)) - assert "No such organization: org-ikDc4ex8NB" in str(e) + assert "header should match organization for API key" in str(e) # good org works response = await router.acompletion( @@ -581,7 +581,7 @@ async def test_aaaaatext_completion_with_organization(): pytest.fail("Request should have failed - This organization does not exist") except Exception as e: print("Got exception: " + str(e)) - assert "No such organization: org-ikDc4ex8NB" in str(e) + assert "header should match organization for API key" in str(e) # good org works response = await router.atext_completion(