From cc59eb9e659ec724e9fddc5419ab248dd1f0ca18 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 21 Apr 2025 18:57:01 -0700 Subject: [PATCH] _init_kwargs_for_pass_through_endpoint --- .../test_pass_through_unit_tests.py | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/tests/pass_through_unit_tests/test_pass_through_unit_tests.py b/tests/pass_through_unit_tests/test_pass_through_unit_tests.py index 9cc92fb3d0..dd5fc4275e 100644 --- a/tests/pass_through_unit_tests/test_pass_through_unit_tests.py +++ b/tests/pass_through_unit_tests/test_pass_through_unit_tests.py @@ -115,7 +115,15 @@ def test_init_kwargs_for_pass_through_endpoint_basic( user_api_key_dict=mock_user_api_key_dict, passthrough_logging_payload=passthrough_payload, litellm_call_id="test-call-id", - logging_obj=Mock(), + logging_obj=LiteLLMLoggingObj( + model="test-model", + messages=[], + stream=False, + call_type="test-call-type", + start_time=datetime.now(), + litellm_call_id="test-call-id", + function_id="test-function-id", + ), ) assert result["call_type"] == "pass_through_endpoint" @@ -159,7 +167,15 @@ def test_init_kwargs_with_litellm_metadata(mock_request, mock_user_api_key_dict) passthrough_logging_payload=passthrough_payload, _parsed_body=parsed_body, litellm_call_id="test-call-id", - logging_obj=Mock(), + logging_obj=LiteLLMLoggingObj( + model="test-model", + messages=[], + stream=False, + call_type="test-call-type", + start_time=datetime.now(), + litellm_call_id="test-call-id", + function_id="test-function-id", + ), ) # Check that litellm_metadata was merged with default metadata @@ -185,7 +201,15 @@ def test_init_kwargs_with_tags_in_header(mock_request, mock_user_api_key_dict): user_api_key_dict=mock_user_api_key_dict, passthrough_logging_payload=passthrough_payload, litellm_call_id="test-call-id", - logging_obj=Mock(), + logging_obj=LiteLLMLoggingObj( + model="test-model", + messages=[], + stream=False, + call_type="test-call-type", + start_time=datetime.now(), + litellm_call_id="test-call-id", + function_id="test-function-id", + ), ) # Check that tags were added to metadata