test(responses): give the deferred-item tests their own tool call ids

call_1 is cached in TOOL_CALLS_CACHE by unrelated tests, and that cache is
module-level state no per-test fixture clears under xdist. The ids here are
never asserted on, so move them off the shared value.
This commit is contained in:
liracle 2026-08-29 15:35:38 +08:00
parent 14433e6d01
commit f5ec303e41

View file

@ -195,7 +195,7 @@ async def test_tool_call_only_stream_skips_ghost_message_done():
_chunk(
tool_calls=[
{
"id": "call_1",
"id": "call_deferred_message",
"type": "function",
"function": {"name": "do_thing", "arguments": '{"x":1}'},
"index": 0,
@ -241,7 +241,7 @@ async def test_reasoning_after_tool_call_still_gets_item_declaration():
_chunk(
tool_calls=[
{
"id": "call_1",
"id": "call_late_reasoning",
"type": "function",
"function": {"name": "do_thing", "arguments": "{}"},
"index": 0,