From 6506fba3bc3a3f408c08c1314372630ae5a6603b Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 4 Jan 2024 22:45:16 +0530 Subject: [PATCH] test(test_proxy_exception_mapping.py): fix exception checking --- litellm/tests/test_proxy_exception_mapping.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/tests/test_proxy_exception_mapping.py b/litellm/tests/test_proxy_exception_mapping.py index d5be29a61a2..59f59e7ac8c 100644 --- a/litellm/tests/test_proxy_exception_mapping.py +++ b/litellm/tests/test_proxy_exception_mapping.py @@ -123,7 +123,7 @@ def test_exception_openai_bad_model(client): response=response ) print("Type of exception=", type(openai_exception)) - assert isinstance(openai_exception, openai.NotFoundError) + assert isinstance(openai_exception, openai.BadRequestError) except Exception as e: pytest.fail(f"LiteLLM Proxy test failed. Exception {str(e)}") @@ -149,7 +149,7 @@ def test_chat_completion_exception_any_model(client): response=response ) print("Exception raised=", openai_exception) - assert isinstance(openai_exception, openai.NotFoundError) + assert isinstance(openai_exception, openai.BadRequestError) except Exception as e: pytest.fail(f"LiteLLM Proxy test failed. Exception {str(e)}") @@ -170,7 +170,7 @@ def test_embedding_exception_any_model(client): response=response ) print("Exception raised=", openai_exception) - assert isinstance(openai_exception, openai.NotFoundError) + assert isinstance(openai_exception, openai.BadRequestError) except Exception as e: pytest.fail(f"LiteLLM Proxy test failed. Exception {str(e)}")