class_docstr: Normalizer tests
class_docstr_tok: ["Normalizer","tests"]
docstr: Normalizer - Load normalization config from "logs" field in the config
docstr_tok: ["Normalizer","-","Load","normalization","config","from","``","logs","''","field","in","the","config"]
code: def test_load_from_config_from_log_conf(self):
      """Normalizer - Load normalization config from "logs" field in the config"""
      config = {
          "logs": {
              "cloudwatch:events": {
                  "schema": {
                      "account": "string",
                      "source": "string",
                      "key": "string",
                  },
                  "parser": "json",
                  "configuration": {
                      "normalization": {
                          "event_name": ["detail", "eventName"],
                          "region": [
                              {
                                  "path": ["region"],
                                  "function": "aws region information",
                              },
                              {
                                  "path": ["detail", "awsRegion"],
                                  "function": "aws region information",
                              },
                          ],
                          "ip_address": [
                              {
                                  "path": ["detail", "sourceIPAddress"],
                                  "function": "source ip address",
                              }
                          ],
                      }
                  },
              }
          }
      }
  
      expected_config = {
          "cloudwatch:events": {
              "event_name": NormalizedType(
                  "cloudwatch:events",
                  "event_name",
                  ["detail", "eventName"],
              ),
              "region": NormalizedType(
                  "cloudwatch:events",
                  "region",
                  [
                      {
                          "path": ["region"],
                          "function": "aws region information",
                      },
                      {
                          "path": ["detail", "awsRegion"],
                          "function": "aws region information",
                      },
                  ],
              ),
              "ip_address": NormalizedType(
                  "cloudwatch:events",
                  "ip_address",
                  [
                      {
                          "path": ["detail", "sourceIPAddress"],
                          "function": "source ip address",
                      }
                  ],
              ),
          }
      }
  
      normalizer = Normalizer.load_from_config(config)
      assert_equal(normalizer, Normalizer)
      assert_equal(normalizer._types_config, expected_config)
  
imports: from mock import Mock, patch
  from nose.tools import assert_equal, assert_false, assert_raises, assert_true
  from streamalert.shared.exceptions import ConfigError
  from streamalert.shared.normalize import Normalizer, NormalizedType
  from tests.unit.streamalert.shared.test_utils import MOCK_RECORD_ID
label_desc: Use image node_id 19 for calling the TestNormalizer obj's underlying member method code with example usage: obj.test_load_from_config_from_log_conf() without return types