def _sns_process(self, payload, classifier): """Process SNS data for alerts""" data = StreamPreParsers.pre_parse_sns(payload.raw_record) self._process_alerts(classifier, payload, data)
def test_pre_parse_sns(): """Pre-Parse SNS Test""" test_data = 'Hello world' raw_record = {'Sns': {'Message': test_data}} data = StreamPreParsers.pre_parse_sns(raw_record) assert_equal(data, test_data)