"""Lambda test module.""" from unittest.mock import patch from src import app as index @patch.object(index, 'dynamo_client') @patch.object(index, 'Producer') def test_handler(mock_producer, mock_dynamo_client): """Test handler function.""" event = { 'correlation_id': 'test-correlation-id' } result = index.handler(event, None) assert result == {'status': 'success'} mock_producer().produce.assert_called() mock_producer().flush.assert_called()