class_docstr: Tests for rule_promotion/publisher.py:StatsPublisher
class_docstr_tok: ["Tests","for","rule_promotion\/publisher.py",":","StatsPublisher"]
docstr: StatsPublisher - Query Alerts, No Alerts for Stat
docstr_tok: ["StatsPublisher","-","Query","Alerts",",","No","Alerts","for","Stat"]
code: def test_query_alerts_none(self, publish_mock):
      """StatsPublisher - Query Alerts, No Alerts for Stat"""
      stats = list(self._get_fake_stats(count=1))
      stats[0].alert_count = 0
      with patch.object(
          self.publisher, "_athena_client", new_callable=PropertyMock
      ) as mock:
          self.publisher.publish(stats)
          assert_equal(stats[0].execution_id, None)
          mock.run_async_query.assert_not_called()
          publish_mock.assert_called_with(stats)
  
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 7 for calling the TestStatsPublisher obj's underlying member method code with example usage: obj.test_query_alerts_none(publish_mock) without return types