@@ -1535,6 +1535,7 @@ def test_handler():
1535
1535
assert "error" in result
1536
1536
assert "ValueError - Test error" in result ["error" ]
1537
1537
1538
+
1538
1539
def test_subscribe_event_with_valid_return (lambda_context , mock_event ):
1539
1540
"""Test error handling during publish event processing."""
1540
1541
# GIVEN a sample publish event
@@ -1551,8 +1552,9 @@ def test_handler():
1551
1552
# WHEN we resolve the event
1552
1553
result = app .resolve (mock_event , lambda_context )
1553
1554
1554
- # THEN we should get an error response
1555
- assert result == 1
1555
+ # THEN we should return None because subscribe always must return None
1556
+ assert result is None
1557
+
1556
1558
1557
1559
def test_subscribe_event_with_no_resolver (lambda_context , mock_event ):
1558
1560
"""Test error handling during publish event processing."""
@@ -1573,6 +1575,7 @@ def test_handler():
1573
1575
# THEN we should get an error response
1574
1576
assert not result
1575
1577
1578
+
1576
1579
def test_publish_events_throw_unauthorized_exception (lambda_context , mock_event ):
1577
1580
"""Test handling events with an empty payload."""
1578
1581
# GIVEN a sample publish event with empty events
@@ -1593,6 +1596,7 @@ def handle_events(payload):
1593
1596
with pytest .raises (UnauthorizedException ):
1594
1597
app .resolve (mock_event , lambda_context )
1595
1598
1599
+
1596
1600
def test_subscribe_events_throw_unauthorized_exception (lambda_context , mock_event ):
1597
1601
"""Test handling events with an empty payload."""
1598
1602
# GIVEN a sample publish event with empty events
0 commit comments