@@ -1517,6 +1517,7 @@ def test_subscribe_event_with_error_handling(lambda_context, mock_event):
15171517 """Test error handling during publish event processing."""
15181518 # GIVEN a sample publish event
15191519 mock_event ["info" ]["operation" ] = "SUBSCRIBE"
1520+ mock_event ["info" ]["channel" ]["path" ] = "/default/powertools"
15201521 del mock_event ["events" ] # SUBSCRIBE events are not supported
15211522
15221523 # GIVEN an AppSyncEventsResolver with a resolver that raises an exception
@@ -1537,12 +1538,12 @@ def test_subscribe_event_with_valid_return(lambda_context, mock_event):
15371538 """Test error handling during publish event processing."""
15381539 # GIVEN a sample publish event
15391540 mock_event ["info" ]["operation" ] = "SUBSCRIBE"
1540- del mock_event ["events" ] # SUBSCRIBE events are not supported
1541+ mock_event ["info" ][ "channel" ][ "path" ] = "/default/powertools"
15411542
15421543 # GIVEN an AppSyncEventsResolver with a resolver that returns ok
15431544 app = AppSyncEventsResolver ()
15441545
1545- @app .on_publish (path = "/default/*" )
1546+ @app .on_subscribe (path = "/default/*" )
15461547 def test_handler ():
15471548 return 1
15481549
@@ -1556,7 +1557,7 @@ def test_subscribe_event_with_no_resolver(lambda_context, mock_event):
15561557 """Test error handling during publish event processing."""
15571558 # GIVEN a sample publish event
15581559 mock_event ["info" ]["operation" ] = "SUBSCRIBE"
1559- del mock_event ["events" ] # SUBSCRIBE events are not supported
1560+ mock_event ["info" ][ "channel" ][ "path" ] = "/default/powertools"
15601561
15611562 # GIVEN an AppSyncEventsResolver with a resolver that returns ok
15621563 app = AppSyncEventsResolver ()
0 commit comments