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]

test: give the mocked prepared request real headers for the masked debug log

mateo-berri76cfa6339b13
diff --git a/tests/test_litellm/proxy/guardrails/test_guardrail_endpoints.py b/tests/test_litellm/proxy/guardrails/test_guardrail_endpoints.py
index 9b2117b7647..9511732fd50 100644
--- a/tests/test_litellm/proxy/guardrails/test_guardrail_endpoints.py
+++ b/tests/test_litellm/proxy/guardrails/test_guardrail_endpoints.py
@@ -917,7 +917,9 @@ async def test_bedrock_guardrail_make_api_request_passes_api_key():
"Content-Type": "application/json",
"Authorization": "Bearer test-api-key-789",
}
- mock_request_instance.prepare.return_value = Mock()
+ mock_request_instance.prepare.return_value = Mock(
+ headers=mock_request_instance.headers
+ )
mock_aws_request.return_value = mock_request_instance
await guardrail_hook.make_bedrock_api_request(