def test_critical_alertable(self): """ A service with a critical status is alertable """ service = Service() plugin = PagerdutyAlert() service.overall_status = service.CRITICAL_STATUS self.assertTrue(plugin._service_alertable(service))
def test_non_critical_alertable(self): """ A non-critical service status does not alert """ service = Service() plugin = PagerdutyAlert() service.overall_status = service.WARNING_STATUS self.assertFalse(plugin._service_alertable(service)) service.overall_status = service.ERROR_STATUS self.assertFalse(plugin._service_alertable(service))