Update tests/pass_through_unit_tests/test_unit_test_streaming.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Harshit Jain 2026-02-27 22:10:33 +05:30 • committed by GitHub
parent 0edf31a329
commit b92f9cb352
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -174,11 +174,12 @@ async def test_chunk_processor_passes_kwargs_to_logging_handler():
# Verify async_success_handler was called with kwargs containing
# the API key metadata from input_kwargs
if litellm_logging_obj.async_success_handler.called:
call_kwargs = litellm_logging_obj.async_success_handler.call_args
# The handler_kwargs are spread as **kwargs, check they include response_cost
# (set by the Anthropic handler) and that litellm_params metadata was preserved
assert call_kwargs is not None, "async_success_handler was called but with no args"
assert litellm_logging_obj.async_success_handler.called, \
"async_success_handler should have been called after streaming completed"
call_kwargs = litellm_logging_obj.async_success_handler.call_args
# The handler_kwargs are spread as **kwargs, check they include response_cost
# (set by the Anthropic handler) and that litellm_params metadata was preserved
assert call_kwargs is not None, "async_success_handler was called but with no args"
def test_convert_raw_bytes_to_str_lines():