class_docstr: Test config loading logic with a mocked filesystem.
class_docstr_tok: ["Test","config","loading","logic","with","a","mocked","filesystem","."]
code: def setUp(self):
      self.setUpPyfakefs()
  
      config_data = basic_streamalert_config()
  
      mock_cluster_contents = (
          '{"data_sources": {}, "classifier_config": {"foo": "bar"}}'
      )
  
      # Add config files which should be loaded
      self.fs.create_file(
          "conf/clusters/prod.json", contents=mock_cluster_contents
      )
      self.fs.create_file(
          "conf/clusters/dev.json", contents=mock_cluster_contents
      )
      self.fs.create_file("conf/global.json", contents="{}")
      self.fs.create_file("conf/lambda.json", contents="{}")
      self.fs.create_file("conf/logs.json", contents="{}")
      self.fs.create_file("conf/outputs.json", contents="{}")
      self.fs.create_file(
          "conf/threat_intel.json",
          contents=json.dumps(config_data["threat_intel"]),
      )
      self.fs.create_file(
          "conf/normalized_types.json",
          contents=json.dumps(config_data["normalized_types"]),
      )
      self.fs.create_file(
          "conf/schemas/csv.json",
          contents='{"csv_log2": {"schema": {"data": "string","uid": "integer"},"parser": "csv"}}',
      )
  
      # Create similar structure but with schemas folder instead of logs.json and 2 clusters.
      self.fs.create_file(
          "conf_schemas/clusters/prod.json",
          contents=mock_cluster_contents,
      )
      self.fs.create_file(
          "conf_schemas/clusters/dev.json",
          contents=mock_cluster_contents,
      )
      self.fs.create_file("conf_schemas/global.json", contents="{}")
      self.fs.create_file("conf_schemas/lambda.json", contents="{}")
      self.fs.create_file("conf_schemas/outputs.json", contents="{}")
      self.fs.create_file(
          "conf_schemas/schemas/csv.json",
          contents='{"csv_log": {"schema": {"data": "string","uid": "integer"},"parser": "csv"}}',
      )
      self.fs.create_file(
          "conf_schemas/schemas/json.json",
          contents='{"json_log": {"schema": {"name": "string"},"parser": "json"}}',
      )
      self.fs.create_file(
          "conf_schemas/schemas/json_log_with_dots.json",
          contents='{"json:log.with.dots": {"schema": {"name": "string"},"parser": "json"}}',
      )
  
imports: import json
  from mock import Mock
  from nose.tools import assert_equal, assert_count_equal, assert_false, assert_raises, assert_true
  from pyfakefs import fake_filesystem_unittest
  from streamalert.shared.config import artifact_extractor_enabled, _validate_config, load_config, parse_lambda_arn, ConfigError
  from tests.unit.helpers.config import basic_streamalert_config
label_desc: Use image node_id 1 for calling the TestConfigLoading obj's underlying member method code with example usage: obj.setUp() without return types