def test_extract_envelope_none(self):
        """ParserBase - Extract Envelope, None"""
        record = {
            'key': 'value'
        }

        parser = ParserBase(None)
        envelope = parser._extract_envelope(record)
        assert_equal(envelope, None)
    def test_extract_envelope(self):
        """ParserBase - Extract Envelope"""
        options = {
            'configuration': {
                'envelope_keys': [
                    'env_key_01'
                ]
            }
        }
        record = {
            'env_key_01': 'foo',
            'non_env_key': 'bar'
        }

        parser = ParserBase(options)
        envelope = parser._extract_envelope(record)
        assert_equal(envelope, {'env_key_01': 'foo'})