mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
test: patch CredentialsManagementClient in CLI (#12304)
This commit is contained in:
parent
005de79dd5
commit
3ad6b36ffc
1 changed files with 9 additions and 3 deletions
|
|
@ -17,10 +17,16 @@ from litellm.proxy.client.cli.main import cli
|
|||
|
||||
@pytest.fixture
|
||||
def mock_credentials_client():
|
||||
"""Patch the CredentialsManagementClient used by the CLI commands."""
|
||||
with patch(
|
||||
"litellm.proxy.client.cli.commands.credentials.CredentialsManagementClient"
|
||||
) as mock:
|
||||
yield mock
|
||||
"litellm.proxy.client.credentials.CredentialsManagementClient"
|
||||
) as root_patch:
|
||||
# Ensure the reference used inside the CLI module also points to the mock
|
||||
with patch(
|
||||
"litellm.proxy.client.cli.commands.credentials.CredentialsManagementClient",
|
||||
root_patch,
|
||||
) as cli_patch:
|
||||
yield cli_patch
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue