@@ -44,7 +44,7 @@ def _transfer_call_part(agent_name: str) -> Part:
4444
4545
4646def test_tool () -> str :
47- return ""
47+ return "result "
4848
4949
5050class _TestingAgent (BaseAgent ):
@@ -126,6 +126,12 @@ def test_pause_on_long_running_function_call(
126126 """Tests that a single LlmAgent pauses on long running function call."""
127127 assert testing_utils .simplify_resumable_app_events (runner .run ("test" )) == [
128128 ("root_agent" , Part .from_function_call (name = "test_tool" , args = {})),
129+ (
130+ "root_agent" ,
131+ Part .from_function_response (
132+ name = "test_tool" , response = {"result" : "result" }
133+ ),
134+ ),
129135 ]
130136
131137
@@ -168,6 +174,12 @@ def test_pause_first_agent_on_long_running_function_call(
168174 ),
169175 ),
170176 ("sub_agent_1" , Part .from_function_call (name = "test_tool" , args = {})),
177+ (
178+ "sub_agent_1" ,
179+ Part .from_function_response (
180+ name = "test_tool" , response = {"result" : "result" }
181+ ),
182+ ),
171183 ]
172184
173185 @pytest .mark .asyncio
@@ -195,7 +207,7 @@ def test_pause_second_agent_on_long_running_function_call(
195207 (
196208 "sub_agent_1" ,
197209 Part .from_function_response (
198- name = "test_tool" , response = {"result" : "" }
210+ name = "test_tool" , response = {"result" : "result " }
199211 ),
200212 ),
201213 ("sub_agent_1" , "model response after tool call" ),
@@ -207,6 +219,12 @@ def test_pause_second_agent_on_long_running_function_call(
207219 ),
208220 ),
209221 ("sub_agent_2" , Part .from_function_call (name = "test_tool" , args = {})),
222+ (
223+ "sub_agent_2" ,
224+ Part .from_function_response (
225+ name = "test_tool" , response = {"result" : "result" }
226+ ),
227+ ),
210228 ]
211229
212230
@@ -384,6 +402,12 @@ def test_pause_on_long_running_function_call(
384402 ),
385403 ),
386404 ("sub_agent_2" , Part .from_function_call (name = "test_tool" , args = {})),
405+ (
406+ "sub_agent_2" ,
407+ Part .from_function_response (
408+ name = "test_tool" , response = {"result" : "result" }
409+ ),
410+ ),
387411 ]
388412
389413
@@ -435,6 +459,12 @@ def test_pause_on_long_running_function_call(
435459 ("sub_llm_agent_1" , _transfer_call_part ("sub_llm_agent_2" )),
436460 ("sub_llm_agent_1" , _TRANSFER_RESPONSE_PART ),
437461 ("sub_llm_agent_2" , Part .from_function_call (name = "test_tool" , args = {})),
462+ (
463+ "sub_llm_agent_2" ,
464+ Part .from_function_response (
465+ name = "test_tool" , response = {"result" : "result" }
466+ ),
467+ ),
438468 ]
439469
440470
@@ -489,4 +519,10 @@ def test_pause_on_long_running_function_call(
489519 ("sub_llm_agent_2" , _transfer_call_part ("root_agent" )),
490520 ("sub_llm_agent_2" , _TRANSFER_RESPONSE_PART ),
491521 ("root_agent" , Part .from_function_call (name = "test_tool" , args = {})),
522+ (
523+ "root_agent" ,
524+ Part .from_function_response (
525+ name = "test_tool" , response = {"result" : "result" }
526+ ),
527+ ),
492528 ]
0 commit comments