class_docstr: Tests for shared/alert_table.py
docstr: Alert Table - Create mock table and alerts
docstr_tok: ["Alert","Table","-","Create","mock","table","and","alerts"]
code: def setup(self):
      """Alert Table - Create mock table and alerts"""
      # pylint: disable=attribute-defined-outside-init
      self.dynamo_mock = mock_dynamodb2()
      self.dynamo_mock.start()
  
      setup_mock_alerts_table(_ALERTS_TABLE)
      self.alert_table = alert_table.AlertTable(_ALERTS_TABLE)
  
      self.alerts = [
          alert_module.Alert(
              "even" if i % 2 == 0 else "odd",
              {"key1": "value1", "key2": "value2"},
              {
                  "aws-firehose:alerts",
                  "aws-s3:test-bucket",
                  "slack:test-channel",
              },
          )
          for i in range(3)
      ]
      self.alert_table.add_alerts(self.alerts)
  
imports: from datetime import datetime
  import os
  from botocore.exceptions import ClientError
  from mock import ANY, MagicMock, patch
  from moto import mock_dynamodb2
  from nose.tools import assert_equal, assert_raises
  from streamalert.shared import alert, alert_table
  from tests.unit.helpers.aws_mocks import setup_mock_alerts_table
label_desc: Use image node_id 1 for calling the TestAlertTable obj's underlying member method code with example usage: obj.setup() without return types