From 61d5ab03d79df3b196a39b852d0ff42cc35022c0 Mon Sep 17 00:00:00 2001 From: yucheng Date: Wed, 23 Sep 2026 07:19:04 +0000 Subject: [PATCH] test(batches): assert per-line events beside the aggregate and create events Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/integration/spend/test_batch_line_item_callbacks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/spend/test_batch_line_item_callbacks.py b/tests/integration/spend/test_batch_line_item_callbacks.py index 0407f68cc84..3e1e3ad4e08 100644 --- a/tests/integration/spend/test_batch_line_item_callbacks.py +++ b/tests/integration/spend/test_batch_line_item_callbacks.py @@ -240,8 +240,10 @@ def test_completed_batch_emits_paired_request_response_callback_events_per_jsonl seconds=40, ) aggregate_events: Final = tuple(event for event in events if event["call_type"] == "aretrieve_batch") - line_events: Final = tuple(event for event in events if event["call_type"] != "aretrieve_batch") + line_events: Final = tuple(event for event in events if _hidden(event).get("batch_custom_id") is not None) assert len(aggregate_events) == 1, [event["call_type"] for event in events] + other_events: Final = tuple(event for event in events if event not in aggregate_events + line_events) + assert sorted(event["call_type"] for event in other_events) == ["acreate_batch", "acreate_file"], other_events assert sorted(string_value(_hidden(event)["batch_custom_id"]) for event in line_events) == list( ALL_CUSTOM_IDS ), line_events