@@ -1517,6 +1517,7 @@ def test_subscribe_event_with_error_handling(lambda_context, mock_event):
1517
1517
"""Test error handling during publish event processing."""
1518
1518
# GIVEN a sample publish event
1519
1519
mock_event ["info" ]["operation" ] = "SUBSCRIBE"
1520
+ mock_event ["info" ]["channel" ]["path" ] = "/default/powertools"
1520
1521
del mock_event ["events" ] # SUBSCRIBE events are not supported
1521
1522
1522
1523
# 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):
1537
1538
"""Test error handling during publish event processing."""
1538
1539
# GIVEN a sample publish event
1539
1540
mock_event ["info" ]["operation" ] = "SUBSCRIBE"
1540
- del mock_event ["events" ] # SUBSCRIBE events are not supported
1541
+ mock_event ["info" ][ "channel" ][ "path" ] = "/default/powertools"
1541
1542
1542
1543
# GIVEN an AppSyncEventsResolver with a resolver that returns ok
1543
1544
app = AppSyncEventsResolver ()
1544
1545
1545
- @app .on_publish (path = "/default/*" )
1546
+ @app .on_subscribe (path = "/default/*" )
1546
1547
def test_handler ():
1547
1548
return 1
1548
1549
@@ -1556,7 +1557,7 @@ def test_subscribe_event_with_no_resolver(lambda_context, mock_event):
1556
1557
"""Test error handling during publish event processing."""
1557
1558
# GIVEN a sample publish event
1558
1559
mock_event ["info" ]["operation" ] = "SUBSCRIBE"
1559
- del mock_event ["events" ] # SUBSCRIBE events are not supported
1560
+ mock_event ["info" ][ "channel" ][ "path" ] = "/default/powertools"
1560
1561
1561
1562
# GIVEN an AppSyncEventsResolver with a resolver that returns ok
1562
1563
app = AppSyncEventsResolver ()
0 commit comments