From 704af2ca341e12eada3a29c43153a404403f465d Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 23 Nov 2023 17:20:19 -0800 Subject: [PATCH] (test) testing fix --- litellm/tests/test_router.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/litellm/tests/test_router.py b/litellm/tests/test_router.py index 5a323ddc61..1138d54d36 100644 --- a/litellm/tests/test_router.py +++ b/litellm/tests/test_router.py @@ -165,6 +165,7 @@ def test_exception_raising(): } ] ) + os.environ["AZURE_API_KEY"] = old_api_key except openai.AuthenticationError: print("Test Passed: Caught an OPENAI AUTH Error, Good job. This is what we needed!") os.environ["AZURE_API_KEY"] = old_api_key @@ -213,10 +214,10 @@ def test_reading_key_from_model_list(): } ] ) - except openai.AuthenticationError: - print("Test Passed: Caught an OPENAI AUTH Error, Good job. This is what we needed!") + os.environ["AZURE_API_KEY"] = old_api_key except Exception as e: - print("Got unexpected exception on router!", e) + os.environ["AZURE_API_KEY"] = old_api_key + pytest.fail("Got unexpected exception on router!", e) # test_reading_key_from_model_list()