File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments