diff --git a/helpers/base.py b/helpers/base.py index d7053e066..981125e42 100644 --- a/helpers/base.py +++ b/helpers/base.py @@ -109,4 +109,6 @@ def fetch_values_by_datatype(rec, datatype): result = result[original_key] results.append(result) + rec.keys().remove('normalized_types') + return results diff --git a/stream_alert/rule_processor/payload.py b/stream_alert/rule_processor/payload.py index f81d5170f..fbfc6cb43 100644 --- a/stream_alert/rule_processor/payload.py +++ b/stream_alert/rule_processor/payload.py @@ -82,12 +82,11 @@ def __init__(self, **kwargs): def __repr__(self): repr_str = ( '<{} valid:{} log_source:{} entity:{} ' - 'type:{} record:{} normalized_types:{}>' + 'type:{} record:{}>' ).format( self.__class__.__name__, self.valid, self.log_source, self.entity, - self.type, self.records, - self.normalized_types + self.type, self.records ) return repr_str @@ -127,7 +126,6 @@ def _refresh_record(self, new_record): self.records = None self.type = None self.valid = False - self.normalized_types = None class S3ObjectSizeError(Exception): diff --git a/tests/unit/stream_alert_rule_processor/test_payload.py b/tests/unit/stream_alert_rule_processor/test_payload.py index 2c4507014..aa1a5ca0e 100644 --- a/tests/unit/stream_alert_rule_processor/test_payload.py +++ b/tests/unit/stream_alert_rule_processor/test_payload.py @@ -69,8 +69,7 @@ def test_repr_string(): s3_payload.records = ['rec1', 'rec2'] print_value = ('') + 'record:[\'rec1\', \'rec2\']>') output_print = s3_payload.__repr__() assert_equal(output_print, print_value)