Skip to content

Commit 5a36e3d

Browse files
.
1 parent 6c5f254 commit 5a36e3d

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

tests/integrations/openai/test_openai.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2350,16 +2350,6 @@ async def test_ai_client_span_responses_async_api(
23502350
assert spans[0]["data"] == expected_data
23512351

23522352

2353-
async def example_response_stream():
2354-
yield EXAMPLE_RESPONSES_STREAM[0]
2355-
yield EXAMPLE_RESPONSES_STREAM[1]
2356-
yield EXAMPLE_RESPONSES_STREAM[2]
2357-
yield EXAMPLE_RESPONSES_STREAM[3]
2358-
yield EXAMPLE_RESPONSES_STREAM[4]
2359-
2360-
return
2361-
2362-
23632353
@pytest.mark.asyncio
23642354
@pytest.mark.parametrize(
23652355
"instructions",
@@ -2438,7 +2428,7 @@ async def test_ai_client_span_streaming_responses_async_api(
24382428

24392429
client = AsyncOpenAI(api_key="z")
24402430
returned_stream = AsyncStream(cast_to=None, response=None, client=client)
2441-
returned_stream._iterator = example_response_stream()
2431+
returned_stream._iterator = async_iterator(EXAMPLE_RESPONSES_STREAM)
24422432
client.responses._post = mock.AsyncMock(return_value=returned_stream)
24432433

24442434
with start_transaction(name="openai tx"):

0 commit comments

Comments
 (0)