Skip to content

Commit d7bc647

Browse files
Updating the assertion to be order-independent
1 parent 19941df commit d7bc647

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/test_api_integration.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ def test_session_detail_includes_thinking_blocks(client_thinking):
8181
session = resp.get_json()
8282
assert "messages" in session
8383
assistant_msgs = [m for m in session["messages"] if m.get("role") == "assistant"]
84-
assert len(assistant_msgs) >= 1
85-
assert assistant_msgs[0].get("thinking") == "Considering options carefully."
84+
assert any(
85+
m.get("thinking") == "Considering options carefully." for m in assistant_msgs
86+
)
8687

8788

8889
# --- /api/search ---

0 commit comments

Comments
 (0)