Skip to content

Commit 0de90f0

Browse files
.
1 parent 9dcb437 commit 0de90f0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/integrations/openai_agents/test_openai_agents.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,8 @@ async def test_hosted_mcp_tool_propagation_header_streamed(
13221322
with patch.object(
13231323
model._client.responses,
13241324
"create",
1325-
return_value=api_response,
1325+
# based on https://github.com/openai/openai-python/blob/656e3cab4a18262a49b961d41293367e45ee71b9/src/openai/_base_client.py#L1763
1326+
return_value=await api_response.parse(),
13261327
) as create, mock.patch(
13271328
"sentry_sdk.tracing_utils.Random.randrange", return_value=500000
13281329
):
@@ -2925,7 +2926,8 @@ async def test_streaming_ttft_on_chat_span(sentry_init, test_agent, async_iterat
29252926
with patch.object(
29262927
model._client.responses,
29272928
"create",
2928-
return_value=api_response,
2929+
# based on https://github.com/openai/openai-python/blob/656e3cab4a18262a49b961d41293367e45ee71b9/src/openai/_base_client.py#L1763
2930+
return_value=await api_response.parse(),
29292931
) as _:
29302932
with sentry_sdk.start_transaction(
29312933
name="test_ttft", sampled=True

0 commit comments

Comments
 (0)