From 300130e815c2d2bc388474215c68b8f107dbd94c Mon Sep 17 00:00:00 2001 From: Hemang Date: Wed, 12 Mar 2025 19:17:13 +0100 Subject: [PATCH] Fix broken tests. --- tests/open_ai/test_chat_with_tool_call.py | 3 +++ tests/open_ai/test_chat_without_tool_calls.py | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/tests/open_ai/test_chat_with_tool_call.py b/tests/open_ai/test_chat_with_tool_call.py index 1481842..93eba77 100644 --- a/tests/open_ai/test_chat_with_tool_call.py +++ b/tests/open_ai/test_chat_with_tool_call.py @@ -119,6 +119,9 @@ async def test_chat_completion_with_tool_call_without_streaming( ) trace = await trace_response.json() + for message in trace["messages"]: + message.pop("annotations", None) + # Verify the trace messages expected_messages = history + [ { diff --git a/tests/open_ai/test_chat_without_tool_calls.py b/tests/open_ai/test_chat_without_tool_calls.py index d9ae738..e8128a8 100644 --- a/tests/open_ai/test_chat_without_tool_calls.py +++ b/tests/open_ai/test_chat_without_tool_calls.py @@ -79,6 +79,9 @@ async def test_chat_completion( ) trace = await trace_response.json() + for message in trace["messages"]: + message.pop("annotations", None) + # Verify the trace messages assert trace["messages"] == [ { @@ -159,6 +162,9 @@ async def test_chat_completion_with_image( ) trace = await trace_response.json() + for message in trace["messages"]: + message.pop("annotations", None) + # Verify the trace messages assert trace["messages"] == [ { @@ -227,6 +233,9 @@ async def test_chat_completion_with_invariant_key_in_openai_key_header( ) trace = await trace_response.json() + for message in trace["messages"]: + message.pop("annotations", None) + # Verify the trace messages assert trace["messages"] == [ {