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 0c62e776e9c..501fe24e65e 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 @@ -45,6 +45,18 @@ def mock_request(): class QueryParams: def __init__(self): self._dict = {} + + def __iter__(self): + return iter(self._dict.items()) + + def items(self): + return self._dict.items() + + def keys(self): + return self._dict.keys() + + def values(self): + return self._dict.values() class MockRequest: def __init__( diff --git a/tests/test_litellm/passthrough/test_passthrough_main.py b/tests/test_litellm/passthrough/test_passthrough_main.py index a2008c2f336..de413e4e07d 100644 --- a/tests/test_litellm/passthrough/test_passthrough_main.py +++ b/tests/test_litellm/passthrough/test_passthrough_main.py @@ -182,6 +182,18 @@ def mock_request(): class QueryParams: def __init__(self): self._dict = {} + + def __iter__(self): + return iter(self._dict.items()) + + def items(self): + return self._dict.items() + + def keys(self): + return self._dict.keys() + + def values(self): + return self._dict.values() class MockRequest: def __init__( @@ -291,7 +303,7 @@ async def test_pass_through_request_stream_param_override( "POST", httpx.URL("https://api.anthropic.com/v1/messages"), json=request_body, - params=None, + params={}, headers={ "Authorization": "Bearer test-key" }, @@ -393,7 +405,7 @@ async def test_pass_through_request_stream_param_no_override( headers={ "Authorization": "Bearer test-key" }, - params=None, + params={}, json=request_body, )