Skip to content

Commit a65ab7d

Browse files
committed
Fixes after merge
1 parent 7f21610 commit a65ab7d

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

src/a2a/compat/v0_3/conversions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def to_compat_push_notification_config(
290290
) -> types_v03.PushNotificationConfig:
291291
"""Convert push notification config to v0.3 compat type."""
292292
return types_v03.PushNotificationConfig(
293-
url=core_config.url if core_config.url else '',
293+
url=core_config.url,
294294
id=core_config.id if core_config.id else None,
295295
token=core_config.token if core_config.token else None,
296296
authentication=to_compat_authentication_info(core_config.authentication)

tests/server/test_integration.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -418,18 +418,16 @@ def test_set_push_notification_config(
418418
'method': 'CreateTaskPushNotificationConfig',
419419
'params': {
420420
'task_id': 't2',
421-
'config': {
422-
'url': 'https://example.com',
423-
'token': 'secret-token',
424-
},
421+
'url': 'https://example.com',
422+
'token': 'secret-token',
425423
},
426424
},
427425
)
428426

429427
# Verify response
430428
assert response.status_code == 200
431429
data = response.json()
432-
assert data['result']['pushNotificationConfig']['token'] == 'secret-token'
430+
assert data['result']['token'] == 'secret-token'
433431

434432
# Verify handler was called
435433
handler.on_create_task_push_notification_config.assert_awaited_once()
@@ -463,7 +461,7 @@ def test_get_push_notification_config(
463461
# Verify response
464462
assert response.status_code == 200
465463
data = response.json()
466-
assert data['result']['pushNotificationConfig']['token'] == 'secret-token'
464+
assert data['result']['token'] == 'secret-token'
467465

468466
# Verify handler was called
469467
handler.on_get_task_push_notification_config.assert_awaited_once()

0 commit comments

Comments
 (0)