Skip to content

Commit 22b4b4f

Browse files
committed
fix: test_multi_tool_calls with no shield
test_multi_tool_calls is intended to test if a tool was called twice, the distro it was tested against may not have any shields. Signed-off-by: Derek Higgins <[email protected]>
1 parent 195c465 commit 22b4b4f

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

tests/integration/agents/test_agents.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -696,19 +696,11 @@ def test_multi_tool_calls(llama_stack_client, agent_config):
696696
stream=False,
697697
)
698698
steps = response.steps
699-
assert len(steps) == 7
700-
assert steps[0].step_type == "shield_call"
701-
assert steps[1].step_type == "inference"
702-
assert steps[2].step_type == "shield_call"
703-
assert steps[3].step_type == "tool_execution"
704-
assert steps[4].step_type == "shield_call"
705-
assert steps[5].step_type == "inference"
706-
assert steps[6].step_type == "shield_call"
707-
708-
tool_execution_step = steps[3]
709-
assert len(tool_execution_step.tool_calls) == 2
710-
assert tool_execution_step.tool_calls[0].tool_name.startswith("get_boiling_point")
711-
assert tool_execution_step.tool_calls[1].tool_name.startswith("get_boiling_point")
699+
for step in steps:
700+
if step.step_type == "tool_execution":
701+
assert len(step.tool_calls) == 2
702+
assert step.tool_calls[0].tool_name.startswith("get_boiling_point")
703+
assert step.tool_calls[1].tool_name.startswith("get_boiling_point")
712704

713705
output = response.output_message.content.lower()
714706
assert "-100" in output and "-212" in output

0 commit comments

Comments
 (0)