class_docstr: Test class for test generating Artifact Extractor terrform modules
docstr: CLI - Terraform generate artifact extractor
docstr_tok: ["CLI","-","Terraform","generate","artifact","extractor"]
code: def test_generate_artifact_extractor(self):
      """CLI - Terraform generate artifact extractor"""
      result = artifact_extractor.generate_artifact_extractor(
          self.config
      )
      assert_is_none(result)
  
      self.config["global"]["infrastructure"]["artifact_extractor"] = {
          "enabled": True,
          "firehose_buffer_size": 128,
          "firehose_buffer_interval": 900,
      }
  
      self.config["global"]["infrastructure"]["firehose"][
          "enabled_logs"
      ] = {"unit_test:type_1", "unit_test:type_2"}
  
      self.config["logs"]["unit_test:type_1"] = {
          "schema": {},
          "configuration": {
              "normalization": {
                  "normalized_type": ["original_key1", "original_key2"]
              }
          },
      }
      self.config["logs"]["unit_test:type_2"] = {"schema": {}}
  
      result = artifact_extractor.generate_artifact_extractor(
          self.config
      )
      expected_result = {
          "module": {
              "artifact_extractor": {
                  "source": "./modules/tf_artifact_extractor",
                  "account_id": "12345678910",
                  "prefix": "unit-test",
                  "region": "us-west-1",
                  "glue_catalog_db_name": "unit-test_streamalert",
                  "glue_catalog_table_name": "artifacts",
                  "s3_bucket_name": "unit-test-streamalert-data",
                  "stream_name": "unit_test_streamalert_artifacts",
                  "buffer_size": 128,
                  "buffer_interval": 900,
                  "kms_key_arn": "${aws_kms_key.server_side_encryption.arn}",
                  "schema": [
                      ["function", "string"],
                      ["source_type", "string"],
                      ["streamalert_record_id", "string"],
                      ["type", "string"],
                      ["value", "string"],
                  ],
              }
          }
      }
  
      # FIMME: not sure why assert_equal between result (defaultdict) and expected_result (dict)
      # fails.
      assert_equal(json.dumps(result), json.dumps(expected_result))
  
imports: import json
  from nose.tools import assert_equal, assert_is_none
  from streamalert_cli.config import CLIConfig
  from streamalert_cli.terraform import artifact_extractor
label_desc: Use image node_id 2 for calling the TestTerraformArtifactExtractor obj's underlying member method code with example usage: obj.test_generate_artifact_extractor() without return types