mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix: mock encrypt_value_helper in lifecycle test
CI fails because LITELLM_MASTER_KEY is not set, causing encrypt_value_helper to error on NoneType.encode(). Patch it to pass through values unencrypted in the test. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b48c037712
commit
e014dfb8e0
1 changed files with 3 additions and 1 deletions
|
|
@ -1234,13 +1234,15 @@ class TestAddAndDeleteModelLifecycle:
|
|||
mock_router.delete_deployment = MagicMock()
|
||||
|
||||
_PS = "litellm.proxy.proxy_server"
|
||||
_ENCRYPT = "litellm.proxy.management_endpoints.model_management_endpoints.encrypt_value_helper"
|
||||
with patch(f"{_PS}.prisma_client", mock_prisma), \
|
||||
patch(f"{_PS}.store_model_in_db", True), \
|
||||
patch(f"{_PS}.proxy_config", mock_proxy_config), \
|
||||
patch(f"{_PS}.proxy_logging_obj", MagicMock()), \
|
||||
patch(f"{_PS}.general_settings", {}), \
|
||||
patch(f"{_PS}.premium_user", True), \
|
||||
patch(f"{_PS}.llm_router", mock_router):
|
||||
patch(f"{_PS}.llm_router", mock_router), \
|
||||
patch(_ENCRYPT, side_effect=lambda value, **kwargs: value):
|
||||
|
||||
# --- ADD ---
|
||||
add_result = await add_new_model(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue