@@ -306,13 +306,13 @@ async def test_get_task(
306306) -> None :
307307 """Test retrieving a task."""
308308 mock_grpc_stub .GetTask .return_value = sample_task
309- params = GetTaskRequest (id = f'tasks/ { sample_task .id } ' )
309+ params = GetTaskRequest (id = f'{ sample_task .id } ' )
310310
311311 response = await grpc_transport .get_task (params )
312312
313313 mock_grpc_stub .GetTask .assert_awaited_once_with (
314314 a2a_pb2 .GetTaskRequest (
315- id = f'tasks/ { sample_task .id } ' , history_length = None
315+ id = f'{ sample_task .id } ' , history_length = None
316316 ),
317317 metadata = [
318318 (
@@ -332,14 +332,14 @@ async def test_get_task_with_history(
332332 mock_grpc_stub .GetTask .return_value = sample_task
333333 history_len = 10
334334 params = GetTaskRequest (
335- id = f'tasks/ { sample_task .id } ' , history_length = history_len
335+ id = f'{ sample_task .id } ' , history_length = history_len
336336 )
337337
338338 await grpc_transport .get_task (params )
339339
340340 mock_grpc_stub .GetTask .assert_awaited_once_with (
341341 a2a_pb2 .GetTaskRequest (
342- id = f'tasks/ { sample_task .id } ' , history_length = history_len
342+ id = f'{ sample_task .id } ' , history_length = history_len
343343 ),
344344 metadata = [
345345 (
@@ -364,11 +364,11 @@ async def test_cancel_task(
364364 extensions = [
365365 'https://example.com/test-ext/v3' ,
366366 ]
367- request = a2a_pb2 .CancelTaskRequest (id = f'tasks/ { sample_task .id } ' )
367+ request = a2a_pb2 .CancelTaskRequest (id = f'{ sample_task .id } ' )
368368 response = await grpc_transport .cancel_task (request , extensions = extensions )
369369
370370 mock_grpc_stub .CancelTask .assert_awaited_once_with (
371- a2a_pb2 .CancelTaskRequest (id = f'tasks/ { sample_task .id } ' ),
371+ a2a_pb2 .CancelTaskRequest (id = f'{ sample_task .id } ' ),
372372 metadata = [(HTTP_EXTENSION_HEADER , 'https://example.com/test-ext/v3' )],
373373 )
374374 assert response .status .state == TaskState .TASK_STATE_CANCELED
@@ -387,7 +387,7 @@ async def test_set_task_callback_with_valid_task(
387387
388388 # Create the request object expected by the transport
389389 request = CreateTaskPushNotificationConfigRequest (
390- task_id = 'tasks/ task-1' ,
390+ task_id = 'task-1' ,
391391 config_id = sample_task_push_notification_config .push_notification_config .id ,
392392 config = sample_task_push_notification_config .push_notification_config ,
393393 )
@@ -415,22 +415,22 @@ async def test_set_task_callback_with_invalid_task(
415415 # Return a config with an invalid name format
416416 mock_grpc_stub .CreateTaskPushNotificationConfig .return_value = (
417417 a2a_pb2 .TaskPushNotificationConfig (
418- task_id = 'invalid-path-to-tasks/ task-1' ,
418+ task_id = 'invalid-path-to-task-1' ,
419419 id = 'config-1' ,
420420 push_notification_config = sample_push_notification_config ,
421421 )
422422 )
423423
424424 request = CreateTaskPushNotificationConfigRequest (
425- task_id = 'tasks/ task-1' ,
425+ task_id = 'task-1' ,
426426 config_id = 'config-1' ,
427427 config = sample_push_notification_config ,
428428 )
429429
430430 # Note: The transport doesn't validate the response name format
431431 # It just returns the response from the stub
432432 response = await grpc_transport .set_task_callback (request )
433- assert response .task_id == 'invalid-path-to-tasks/ task-1'
433+ assert response .task_id == 'invalid-path-to-task-1'
434434
435435
436436@pytest .mark .asyncio
@@ -447,14 +447,14 @@ async def test_get_task_callback_with_valid_task(
447447
448448 response = await grpc_transport .get_task_callback (
449449 GetTaskPushNotificationConfigRequest (
450- task_id = 'tasks/ task-1' ,
450+ task_id = 'task-1' ,
451451 id = config_id ,
452452 )
453453 )
454454
455455 mock_grpc_stub .GetTaskPushNotificationConfig .assert_awaited_once_with (
456456 a2a_pb2 .GetTaskPushNotificationConfigRequest (
457- task_id = 'tasks/ task-1' ,
457+ task_id = 'task-1' ,
458458 id = config_id ,
459459 ),
460460 metadata = [
@@ -476,20 +476,20 @@ async def test_get_task_callback_with_invalid_task(
476476 """Test retrieving a task push notification config with an invalid task name."""
477477 mock_grpc_stub .GetTaskPushNotificationConfig .return_value = (
478478 a2a_pb2 .TaskPushNotificationConfig (
479- task_id = 'invalid-path-to-tasks/ task-1' ,
479+ task_id = 'invalid-path-to-task-1' ,
480480 id = 'config-1' ,
481481 push_notification_config = sample_push_notification_config ,
482482 )
483483 )
484484
485485 response = await grpc_transport .get_task_callback (
486486 GetTaskPushNotificationConfigRequest (
487- task_id = 'tasks/ task-1' ,
487+ task_id = 'task-1' ,
488488 id = 'config-1' ,
489489 )
490490 )
491491 # The transport doesn't validate the response name format
492- assert response .task_id == 'invalid-path-to-tasks/ task-1'
492+ assert response .task_id == 'invalid-path-to-task-1'
493493
494494
495495@pytest .mark .parametrize (
0 commit comments