Esempio n. 1
0
    def test_apply_envelope_none(self):
        """ParserBase - Apply Envelope, None"""
        record = {
            'key': 'value'
        }

        ParserBase._apply_envelope(record, {})

        assert_equal(record, {'key': 'value'})
Esempio n. 2
0
    def test_apply_envelope(self):
        """ParserBase - Apply Envelope"""
        record = {
            'key': 'value'
        }
        envelope = {
            'env_key_01': 'value'
        }

        ParserBase._apply_envelope(record, envelope)

        expected_record = {
            'key': 'value',
            'streamalert:envelope_keys': {
                'env_key_01': 'value'
            }
        }

        assert_equal(record, expected_record)