class_docstr: Test shared Alert class.
docstr: Alert Class - Merge - Merge with Nested Keys
docstr_tok: ["Alert","Class","-","Merge","-","Merge","with","Nested","Keys"]
code: def test_merge_nested(self):
      """Alert Class - Merge - Merge with Nested Keys"""
      record1 = {
          "NumMatchedRules": 1,
          "FileInfo": {"Deleted": None, "Nested": [1, 2, "three"]},
          "MatchedRules": {"Rule1": "MatchedStrings"},
      }
      alert1 = Alert(
          "RuleName",
          record1,
          {"slack:channel"},
          created=datetime(year=2000, month=1, day=1),
          merge_by_keys=["Nested"],
          merge_window=timedelta(minutes=5),
      )
  
      record2 = {
          "NumMatchedRules": 2,
          "FileInfo": {"Deleted": None, "Nested": [1, 2, "three"]},
          "MatchedRules": {"Rule1": "MatchedStrings"},
      }
      alert2 = Alert(
          "RuleName",
          record2,
          {"slack:channel"},
          created=datetime(year=2000, month=1, day=2),
          merge_by_keys=["Nested"],
          merge_window=timedelta(minutes=5),
      )
  
      record3 = {
          "MatchedRules": {"Rule1": "MatchedStrings"},
          "Nested": [
              1,
              2,
              "three",
          ],  # This is in a different place in the record
      }
      alert3 = Alert(
          "RuleName",
          record3,
          {"slack:channel"},
          created=datetime(year=2000, month=1, day=3),
          merge_by_keys=["Nested"],
          merge_window=timedelta(minutes=5),
      )
  
      merged = Alert.merge([alert1, alert2, alert3])
  
      expected_record = {
          "AlertCount": 3,
          "AlertTimeFirst": "2000-01-01T00:00:00.000000Z",
          "AlertTimeLast": "2000-01-03T00:00:00.000000Z",
          "MergedBy": {"Nested": [1, 2, "three"]},
          "OtherCommonKeys": {
              "MatchedRules": {"Rule1": "MatchedStrings"}
          },
          "ValueDiffs": {
              "2000-01-01T00:00:00.000000Z": {
                  "NumMatchedRules": 1,
                  "FileInfo": {"Deleted": None},
              },
              "2000-01-02T00:00:00.000000Z": {
                  "NumMatchedRules": 2,
                  "FileInfo": {"Deleted": None},
              },
              "2000-01-03T00:00:00.000000Z": {},
          },
      }
  
      assert_equal(expected_record, merged.record)
  
imports: import copy
  from datetime import datetime, timedelta
  import json
  from nose.tools import assert_equal, assert_false, assert_is_instance, assert_not_in, assert_raises, assert_true
  from streamalert.shared.alert import Alert, AlertCreationError
label_desc: Use image node_id 37 for calling the TestAlert obj's underlying member method code with example usage: obj.test_merge_nested() without return types