From 7c3c9ab7efe3463ed902ca9f90ab6df2b568e42b Mon Sep 17 00:00:00 2001 From: user <70670632+stuxf@users.noreply.github.com> Date: Wed, 29 Apr 2026 23:00:45 -0700 Subject: [PATCH] test(proxy): opt mock-response fixtures into client mocks --- tests/test_litellm/proxy/test_litellm_pre_call_utils.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_litellm/proxy/test_litellm_pre_call_utils.py b/tests/test_litellm/proxy/test_litellm_pre_call_utils.py index d462a1b7ca..a19c84d3af 100644 --- a/tests/test_litellm/proxy/test_litellm_pre_call_utils.py +++ b/tests/test_litellm/proxy/test_litellm_pre_call_utils.py @@ -1843,7 +1843,10 @@ async def test_add_litellm_metadata_from_request_headers(): # Create mock user API key dict mock_user_api_key_dict = UserAPIKeyAuth( - api_key="test-key", user_id="test-user", org_id="test-org" + api_key="test-key", + user_id="test-user", + org_id="test-org", + metadata={"allow_client_mock_response": True}, ) # Create mock proxy logging object @@ -1956,7 +1959,9 @@ async def test_anthropic_messages_standard_logging_object_matches_fixture(): mock_fastapi_response = MagicMock(spec=Response) mock_user_api_key_dict = UserAPIKeyAuth( - api_key="test-key", user_id="default_user_id" + api_key="test-key", + user_id="default_user_id", + metadata={"allow_client_mock_response": True}, ) mock_proxy_logging_obj = MagicMock(spec=ProxyLogging)