class_docstr: Test class for JSONParser
class_docstr_tok: ["Test","class","for","JSONParser"]
docstr: JSONParser - Default Values for Missing Envelope Keys
docstr_tok: ["JSONParser","-","Default","Values","for","Missing","Envelope","Keys"]
code: def test_envelope_keys_optional_values(self):
      """JSONParser - Default Values for Missing Envelope Keys"""
      options = self._json_regex_key_options()
  
      # missing 'host' envelope key
      record_data = json.dumps(
          {
              "message": json.dumps(
                  {"nested_key_01": "foo", "nested_key_02": "bar"}
              ),
              "date": "2017/10/01",
              "time": "14:00:00",
          }
      )
  
      # get parsed data
      parser = JSONParser(options)
      assert_equal(parser.parse(record_data), True)
  
      expected_result = [
          {
              "nested_key_01": "foo",
              "nested_key_02": "bar",
              "streamalert:envelope_keys": {
                  "host": "",
                  "date": "2017/10/01",
                  "time": "14:00:00",
              },
          }
      ]
      assert_equal(parser.parsed_records, expected_result)
  
imports: import json
  from mock import patch
  from nose.tools import assert_equal
  from streamalert.classifier.parsers import JSONParser
label_desc: Use image node_id 6 for calling the TestJSONParser obj's underlying member method code with example usage: obj.test_envelope_keys_optional_values() without return types