Skip to content

Commit 967ada3

Browse files
committed
fix tests
1 parent 9f8f587 commit 967ada3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tests/server/request_handlers/test_default_request_handler_v2.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
InternalError,
3131
InvalidParamsError,
3232
TaskNotFoundError,
33-
UnsupportedOperationError,
33+
PushNotificationNotSupportedError,
3434
)
3535
from a2a.types.a2a_pb2 import (
3636
AgentCapabilities,
@@ -354,7 +354,7 @@ async def test_set_task_push_notification_config_no_notifier():
354354
params = TaskPushNotificationConfig(
355355
task_id='task1', url='http://example.com'
356356
)
357-
with pytest.raises(UnsupportedOperationError):
357+
with pytest.raises(PushNotificationNotSupportedError):
358358
await request_handler.on_create_task_push_notification_config(
359359
params, create_server_call_context()
360360
)
@@ -398,7 +398,7 @@ async def test_get_task_push_notification_config_no_store():
398398
params = GetTaskPushNotificationConfigRequest(
399399
task_id='task1', id='task_push_notification_config'
400400
)
401-
with pytest.raises(UnsupportedOperationError):
401+
with pytest.raises(PushNotificationNotSupportedError):
402402
await request_handler.on_get_task_push_notification_config(
403403
params, create_server_call_context()
404404
)
@@ -583,7 +583,7 @@ async def test_list_task_push_notification_config_no_store():
583583
agent_card=create_default_agent_card(),
584584
)
585585
params = ListTaskPushNotificationConfigsRequest(task_id='task1')
586-
with pytest.raises(UnsupportedOperationError):
586+
with pytest.raises(PushNotificationNotSupportedError):
587587
await request_handler.on_list_task_push_notification_configs(
588588
params, create_server_call_context()
589589
)
@@ -711,11 +711,11 @@ async def test_delete_task_push_notification_config_no_store():
711711
params = DeleteTaskPushNotificationConfigRequest(
712712
task_id='task1', id='config1'
713713
)
714-
with pytest.raises(UnsupportedOperationError) as exc_info:
714+
with pytest.raises(PushNotificationNotSupportedError) as exc_info:
715715
await request_handler.on_delete_task_push_notification_config(
716716
params, create_server_call_context()
717717
)
718-
assert isinstance(exc_info.value, UnsupportedOperationError)
718+
assert isinstance(exc_info.value, PushNotificationNotSupportedError)
719719

720720

721721
@pytest.mark.asyncio

0 commit comments

Comments
 (0)