class_docstr: Tests for rule_promotion/promoter.py:RulePromoter
docstr: RulePromoter - Setup
docstr_tok: ["RulePromoter","-","Setup"]
code: def setup(self):
      """RulePromoter - Setup"""
      # pylint: disable=attribute-defined-outside-init
      self.dynamo_mock = mock_dynamodb2()
      self.dynamo_mock.start()
      with patch(
          "streamalert.rule_promotion.promoter.load_config"
      ) as config_mock, patch(
          "streamalert.rule_promotion.promoter.StatsPublisher", Mock()
      ), patch(
          "boto3.client", _mock_boto
      ), patch.dict(
          os.environ, {"AWS_DEFAULT_REGION": "us-east-1"}
      ):
          setup_mock_rules_table(_RULES_TABLE)
          config_mock.return_value = config.load_config(
              "tests/unit/conf/"
          )
          self.promoter = RulePromoter()
          self._add_fake_stats()
  
imports: from datetime import datetime, timedelta
  import os
  from boto3 import client
  from mock import Mock, patch, PropertyMock
  from moto import mock_dynamodb2
  from nose.tools import assert_equal
  from streamalert.rule_promotion.promoter import RulePromoter
  from streamalert.rule_promotion.statistic import StagingStatistic
  from streamalert.shared import config, rule
  from tests.unit.helpers.aws_mocks import MockAthenaClient, setup_mock_rules_table
label_desc: Use image node_id 1 for calling the TestRulePromoter obj's underlying member method code with example usage: obj.setup() without return types