mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-29 06:33:28 +00:00
test(proxy): pin that delete_credentials keeps the credential_list object
This commit is contained in:
parent
27c192e1ae
commit
f60f4252d4
1 changed files with 4 additions and 4 deletions
|
|
@ -2075,16 +2075,16 @@ async def test_ProxyConfig_delete_credentials_drops_only_names_missing_from_db_a
|
|||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
pc = ProxyConfig()
|
||||
monkeypatch.setattr(
|
||||
litellm, "credential_list", [_credential("db-kept"), _credential("stale"), _credential("from-config")]
|
||||
)
|
||||
loaded = [_credential("db-kept"), _credential("stale"), _credential("from-config")]
|
||||
monkeypatch.setattr(litellm, "credential_list", loaded)
|
||||
monkeypatch.setattr(
|
||||
pc, "get_config", AsyncMock(return_value={"credential_list": [_credential("from-config").model_dump()]})
|
||||
)
|
||||
|
||||
await pc.delete_credentials([_credential("db-kept")])
|
||||
|
||||
assert [cred.credential_name for cred in litellm.credential_list] == ["db-kept", "from-config"]
|
||||
assert litellm.credential_list is loaded
|
||||
assert [cred.credential_name for cred in loaded] == ["db-kept", "from-config"]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue