def test_survive_nonexisting_senders(self): a = Alerter("foo,bar") a.run(self.alerts) a.send_alerts() self.assertTrue(a.recorded_alerts is not None)
def test_multiple_run_keeps_details(self): a = Alerter("") a.run(self.alerts[0:2]) a.run(self.alerts[2:]) self.assertEquals(5, len(a.recorded_alerts))
def test_flatten_details(self): a = Alerter("") a.run(self.alerts) self.assertEquals(3, len(a.recorded_alerts)) self.assertTrue(any(x[0] == "complex" for x in a.recorded_alerts)) self.assertTrue(any(x[1] == "_2_" for x in a.recorded_alerts))
def test_flatten_details(self): a = Alerter("") a.run(self.alerts) self.assertEquals(5, len(a.recorded_alerts)) self.assertTrue(any(x[0] == "complex" for x in a.recorded_alerts)) self.assertTrue(any(x[1] == "_2_" for x in a.recorded_alerts))
def test_multiple_run_keeps_details(self): a = Alerter("") a.run(self.alerts[0:2]) a.run(self.alerts[2:]) self.assertEquals(3, len(a.recorded_alerts))