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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test_lists_with_sensitive_keys_are_masked
Ishaan Jaffer6b7f11484700
diff --git a/tests/test_litellm/litellm_core_utils/test_sensitive_data_masker.py b/tests/test_litellm/litellm_core_utils/test_sensitive_data_masker.pyindex 9f0a1ae8ffe..b9f17aa4c7f 100644--- a/tests/test_litellm/litellm_core_utils/test_sensitive_data_masker.py+++ b/tests/test_litellm/litellm_core_utils/test_sensitive_data_masker.py@@ -108,14 +108,16 @@ def test_lists_with_sensitive_keys_are_masked():"""masker = SensitiveDataMasker()data = {- "api_key": ["sk-123", "sk-456"],+ "api_key": ["sk-1234567890abcdef", "sk-9876543210fedcba"],"tags": ["prod", "test"],}masked = masker.mask_dict(data)# sensitive key list entries should be masked- assert masked["api_key"][0] != "sk-123"+ assert masked["api_key"][0] != "sk-1234567890abcdef"assert "*" in masked["api_key"][0]+ assert masked["api_key"][1] != "sk-9876543210fedcba"+ assert "*" in masked["api_key"][1]# non-sensitive list should remain unchangedassert masked["tags"] == ["prod", "test"]