Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix: mock encrypt_value_helper in lifecycle test

Yuneng Jiange014dfb8e0e5
diff --git a/tests/test_litellm/proxy/management_endpoints/test_model_management_endpoints.py b/tests/test_litellm/proxy/management_endpoints/test_model_management_endpoints.py
index cbc6f1db3c7..c3e3d1ecbd9 100644
--- a/tests/test_litellm/proxy/management_endpoints/test_model_management_endpoints.py
+++ b/tests/test_litellm/proxy/management_endpoints/test_model_management_endpoints.py
@@ -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(