class_docstr: Tests for rule_promotion/publisher.py:StatsPublisher
class_docstr_tok: ["Tests","for","rule_promotion\/publisher.py",":","StatsPublisher"]
docstr: StatsPublisher - Query Alerts, Bad Response
docstr_tok: ["StatsPublisher","-","Query","Alerts",",","Bad","Response"]
code: def test_query_alerts_bad_reponse(self):
      """StatsPublisher - Query Alerts, Bad Response"""
      stat = list(self._get_fake_stats(count=1))[0]
      with patch.object(
          self.publisher, "_athena_client", new_callable=PropertyMock
      ) as mock:
          mock.run_async_query.side_effect = (
              athena.AthenaQueryExecutionError()
          )
          assert_raises(
              athena.AthenaQueryExecutionError,
              self.publisher._query_alerts,
              stat,
          )
  
file_path: streamalert/tests/unit/streamalert/rule_promotion/test_publisher.py
imports: from datetime import datetime, timedelta
  from mock import patch, PropertyMock
  from nose.tools import assert_equal, assert_raises
  from streamalert.rule_promotion.publisher import StatsPublisher
  from streamalert.rule_promotion.statistic import StagingStatistic
  from streamalert.shared import athena, config
label_desc: Use image node_id 8 for calling the TestStatsPublisher obj's underlying member method code with example usage: obj.test_query_alerts_bad_reponse() without return types