From 4d85387b5ae484066fa267bb2e5b9993c7c1ba0d Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 25 Mar 2024 19:33:57 -0700 Subject: [PATCH] test(test_azure_astreaming_and_function_calling): fix test to handle caching --- litellm/tests/test_streaming.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/tests/test_streaming.py b/litellm/tests/test_streaming.py index 79036ab01c..ee7cb64cdd 100644 --- a/litellm/tests/test_streaming.py +++ b/litellm/tests/test_streaming.py @@ -2096,7 +2096,7 @@ async def test_azure_astreaming_and_function_calling(): chunk.choices[0].delta.tool_calls[0].function.arguments, str ) validate_first_streaming_function_calling_chunk(chunk=chunk) - elif idx == 1: + elif idx == 1 and chunk.choices[0].finish_reason is None: validate_second_streaming_function_calling_chunk(chunk=chunk) elif chunk.choices[0].finish_reason is not None: # last chunk validate_final_streaming_function_calling_chunk(chunk=chunk)