mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
test: fix test - delete env var before running
This commit is contained in:
parent
e2ae504a81
commit
d9c32342fe
1 changed files with 2 additions and 0 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue