From d9c32342fe12e56764712fa0bc1ea6e5b6521e80 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 11 Mar 2025 20:57:57 -0700 Subject: [PATCH] test: fix test - delete env var before running --- tests/local_testing/test_router_client_init.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/local_testing/test_router_client_init.py b/tests/local_testing/test_router_client_init.py index dc0f4f237d0..1440dfecaad 100644 --- a/tests/local_testing/test_router_client_init.py +++ b/tests/local_testing/test_router_client_init.py @@ -137,6 +137,7 @@ def test_router_init_azure_service_principal_with_secret_with_environment_variab mocked_os_lib: MagicMock, mocked_credential: MagicMock, mocked_get_bearer_token_provider: MagicMock, + monkeypatch, ) -> None: """ Test router initialization and sample completion using Azure Service Principal with Secret authentication workflow, @@ -145,6 +146,7 @@ def test_router_init_azure_service_principal_with_secret_with_environment_variab To allow for local testing without real credentials, first must mock Azure SDK authentication functions and environment variables. """ + monkeypatch.delenv("AZURE_API_KEY", raising=False) litellm.enable_azure_ad_token_refresh = True # mock the token provider function mocked_func_generating_token = MagicMock(return_value="test_token")