test(websearch): assert server_tool_use block unconditionally

Signed-off-by: agustin18 <agustinsaiz02@gmail.com>
This commit is contained in:
agustin18 2026-09-27 20:56:07 +00:00
parent 25a6354465
commit 10fbe70c6a

View file

@ -481,6 +481,5 @@ class TestShortCircuitEntryPoint:
assert result is not None
mock_search.assert_called_once_with(expected_query)
tool_use_block = next((b for b in result["content"] if b["type"] == "server_tool_use"), None)
if tool_use_block is not None:
assert tool_use_block["input"]["query"] == expected_query
tool_use_block = next(b for b in result["content"] if b["type"] == "server_tool_use")
assert tool_use_block["input"]["query"] == expected_query