Skip to content

Commit

Permalink
removing tech debt in publisher tests (#782)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandeivert authored Jul 3, 2018
1 parent 0739c4f commit ea5ebe3
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions tests/unit/stream_alert_rule_promotion/test_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ def setup(self):
current_time=datetime(year=2000, month=1, day=1, hour=1, minute=1, second=1)
)

self.publisher._state = {
'sent_daily_digest': False,
'send_digest_hour_utc': 12
}

@staticmethod
def _get_fake_stats(count=2):
"""Helper function to return fake StagingStatistics"""
Expand Down Expand Up @@ -101,7 +96,6 @@ def test_format_digest(self):
@patch('stream_alert.rule_promotion.publisher.StatsPublisher._publish_message')
def test_query_alerts_none(self, publish_mock):
"""StatsPublisher - Query Alerts, No Alerts for Stat"""
self.publisher._state['send_digest_hour_utc'] = 1
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:
Expand Down Expand Up @@ -147,6 +141,5 @@ def test_publish(self, query_mock, publish_mock):
"""StatsPublisher - Publish, False"""
query_mock.return_value = 'fake-id'
stats = list(self._get_fake_stats(count=1))
self.publisher._state['send_digest_hour_utc'] = 1
self.publisher.publish(stats)
publish_mock.assert_called_with(stats)

0 comments on commit ea5ebe3

Please sign in to comment.