def test_queue_timeout(self): proc = FirehoseProcessor("test") proc.MAX_INTERVAL = 0 proc.start() proc.stop() eq_(len(self.mock_boto.mock_calls), 1)
def test_queue_timeout(self): proc = FirehoseProcessor("test") proc.MAX_INTERVAL = 0 proc._records.get = mock_get = Mock() proc._send_record_batch = mock_send = Mock() mock_get.side_effect = (Queue.Empty, None) proc.start() proc.stop() mock_send.assert_called()