class_docstr: S3Payload tests
class_docstr_tok: ["S3Payload","tests"]
docstr: S3Payload - Pre Parse
docstr_tok: ["S3Payload","-","Pre","Parse"]
code: def test_pre_parse(self):
      """S3Payload - Pre Parse"""
      with patch.object(S3Payload, "_read_file") as reader:
          reader.side_effect = [
              [(1, {"key_01": "value_01"}), (2, {"key_02": "value_02"})]
          ]
  
          expected_result = [
              {"key_01": "value_01"},
              {"key_02": "value_02"},
          ]
  
          payload = S3Payload(None, self._record)
          result = [
              rec._record_data for rec in list(payload.pre_parse())
          ]
          assert_equal(result, expected_result)
  
imports: import json
  import gzip
  import os
  import tempfile
  import boto3
  from botocore.exceptions import ClientError
  from mock import patch
  from moto import mock_s3
  from nose.tools import assert_equal, assert_raises
  from pyfakefs import fake_filesystem_unittest
  from streamalert.classifier.payload.s3 import S3Payload, S3PayloadError
label_desc: Use image node_id 18 for calling the TestS3Payload obj's underlying member method code with example usage: obj.test_pre_parse() without return types