class_docstr: Test class for JSONParser
class_docstr_tok: ["Test","class","for","JSONParser"]
docstr: JSONParser - Invalid Schema Definition
docstr_tok: ["JSONParser","-","Invalid","Schema","Definition"]
code: def test_optional_keys_missing_in_schema(self, log_mock):
      """JSONParser - Invalid Schema Definition"""
      options = {
          "schema": {
              "key1": [],
              "key2": "string",
              "key3": "integer",
              "key9": "boolean",
              "key10": {},
              "key11": "float",
          },
          "configuration": {
              "optional_top_level_keys": [
                  "key9",
                  "key10",
                  "key11",
                  "key12",
              ]
          },
      }
  
      record_data = json.dumps(
          {
              "key1": ["test data", "moar test data"],
              "key2": "string data",
              "key3": 100,
              "key9": True,
          }
      )
  
      # get parsed data
      log_type = "invaid_log"
      parser = JSONParser(options, log_type)
      assert_equal(parser.parse(record_data), False)
      log_mock.assert_called_with(
          "Schema definition is not valid (%s):\n%s",
          log_type,
          options["schema"],
      )
  
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 10 for calling the TestJSONParser obj's underlying member method code with example usage: obj.test_optional_keys_missing_in_schema(log_mock) without return types