mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-21 08:26:34 +00:00
fix(test): correct assertion order in test_case_a_orphaned_tool_call_multiple
The implementation correctly preserves tool_call order: existing results first (call_1), then dummy results for missing ones (call_2). The test was asserting the reverse order with incorrect comments. Fix the assertions to match the actual correct behavior. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
838bfc8616
commit
d44d52f1e3
@@ -116,8 +116,8 @@ class TestMessageSanitization:
|
||||
assert len(sanitized) == 4
|
||||
assert sanitized[0]["role"] == "user"
|
||||
assert sanitized[1]["role"] == "assistant"
|
||||
assert sanitized[2]["tool_call_id"] == "call_2" # Dummy added first
|
||||
assert sanitized[3]["tool_call_id"] == "call_1" # Original tool result
|
||||
assert sanitized[2]["tool_call_id"] == "call_1" # Original tool result (first in tool_calls)
|
||||
assert sanitized[3]["tool_call_id"] == "call_2" # Dummy added for missing call_2
|
||||
|
||||
def test_case_b_orphaned_tool_result(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user