@@ -139,7 +139,9 @@ async def test_on_get_task_not_found():
139139 await request_handler .on_get_task (params , create_server_call_context ())
140140
141141 assert isinstance (exc_info .value .error , TaskNotFoundError )
142- mock_task_store .get .assert_awaited_once_with ('non_existent_task' )
142+ mock_task_store .get .assert_awaited_once_with (
143+ 'non_existent_task' , create_server_call_context ()
144+ )
143145
144146
145147@pytest .mark .asyncio
@@ -161,7 +163,10 @@ async def test_on_cancel_task_task_not_found():
161163 )
162164
163165 assert isinstance (exc_info .value .error , TaskNotFoundError )
164- mock_task_store .get .assert_awaited_once_with ('task_not_found_for_cancel' )
166+ mock_task_store .get .assert_awaited_once_with (
167+ 'task_not_found_for_cancel' ,
168+ create_server_call_context ()
169+ )
165170
166171
167172@pytest .mark .asyncio
@@ -204,7 +209,10 @@ async def test_on_cancel_task_queue_tap_returns_none():
204209 params , create_server_call_context ()
205210 )
206211
207- mock_task_store .get .assert_awaited_once_with ('tap_none_task' )
212+ mock_task_store .get .assert_awaited_once_with (
213+ 'tap_none_task' ,
214+ create_server_call_context ()
215+ )
208216 mock_queue_manager .tap .assert_awaited_once_with ('tap_none_task' )
209217 # agent_executor.cancel should be called with a new EventQueue if tap returned None
210218 mock_agent_executor .cancel .assert_awaited_once ()
@@ -1278,7 +1286,10 @@ async def test_set_task_push_notification_config_task_not_found():
12781286 )
12791287
12801288 assert isinstance (exc_info .value .error , TaskNotFoundError )
1281- mock_task_store .get .assert_awaited_once_with ('non_existent_task' )
1289+ mock_task_store .get .assert_awaited_once_with (
1290+ 'non_existent_task' ,
1291+ create_server_call_context ()
1292+ )
12821293 mock_push_store .set_info .assert_not_awaited ()
12831294
12841295
@@ -1321,7 +1332,10 @@ async def test_get_task_push_notification_config_task_not_found():
13211332 )
13221333
13231334 assert isinstance (exc_info .value .error , TaskNotFoundError )
1324- mock_task_store .get .assert_awaited_once_with ('non_existent_task' )
1335+ mock_task_store .get .assert_awaited_once_with (
1336+ 'non_existent_task' ,
1337+ create_server_call_context ()
1338+ )
13251339 mock_push_store .get_info .assert_not_awaited ()
13261340
13271341
@@ -1352,7 +1366,10 @@ async def test_get_task_push_notification_config_info_not_found():
13521366 assert isinstance (
13531367 exc_info .value .error , InternalError
13541368 ) # Current code raises InternalError
1355- mock_task_store .get .assert_awaited_once_with ('non_existent_task' )
1369+ mock_task_store .get .assert_awaited_once_with (
1370+ 'non_existent_task' ,
1371+ create_server_call_context ()
1372+ )
13561373 mock_push_store .get_info .assert_awaited_once_with ('non_existent_task' )
13571374
13581375
@@ -1459,7 +1476,10 @@ async def test_on_resubscribe_to_task_task_not_found():
14591476 pass
14601477
14611478 assert isinstance (exc_info .value .error , TaskNotFoundError )
1462- mock_task_store .get .assert_awaited_once_with ('resub_task_not_found' )
1479+ mock_task_store .get .assert_awaited_once_with (
1480+ 'resub_task_not_found' ,
1481+ create_server_call_context ()
1482+ )
14631483
14641484
14651485@pytest .mark .asyncio
@@ -1490,7 +1510,10 @@ async def test_on_resubscribe_to_task_queue_not_found():
14901510 assert isinstance (
14911511 exc_info .value .error , TaskNotFoundError
14921512 ) # Should be TaskNotFoundError as per spec
1493- mock_task_store .get .assert_awaited_once_with ('resub_queue_not_found' )
1513+ mock_task_store .get .assert_awaited_once_with (
1514+ 'resub_queue_not_found' ,
1515+ create_server_call_context ()
1516+ )
14941517 mock_queue_manager .tap .assert_awaited_once_with ('resub_queue_not_found' )
14951518
14961519
@@ -1570,7 +1593,10 @@ async def test_list_task_push_notification_config_task_not_found():
15701593 )
15711594
15721595 assert isinstance (exc_info .value .error , TaskNotFoundError )
1573- mock_task_store .get .assert_awaited_once_with ('non_existent_task' )
1596+ mock_task_store .get .assert_awaited_once_with (
1597+ 'non_existent_task' ,
1598+ create_server_call_context ()
1599+ )
15741600 mock_push_store .get_info .assert_not_awaited ()
15751601
15761602
@@ -1730,7 +1756,10 @@ async def test_delete_task_push_notification_config_task_not_found():
17301756 )
17311757
17321758 assert isinstance (exc_info .value .error , TaskNotFoundError )
1733- mock_task_store .get .assert_awaited_once_with ('non_existent_task' )
1759+ mock_task_store .get .assert_awaited_once_with (
1760+ 'non_existent_task' ,
1761+ create_server_call_context ()
1762+ )
17341763 mock_push_store .get_info .assert_not_awaited ()
17351764
17361765
@@ -1987,7 +2016,9 @@ async def test_on_resubscribe_to_task_in_terminal_state(terminal_state):
19872016 f'Task { task_id } is in terminal state: { terminal_state .value } '
19882017 in exc_info .value .error .message
19892018 )
1990- mock_task_store .get .assert_awaited_once_with (task_id )
2019+ mock_task_store .get .assert_awaited_once_with (
2020+ task_id , create_server_call_context ()
2021+ )
19912022
19922023
19932024@pytest .mark .asyncio
0 commit comments