Ejemplo n.º 1
0
 def test_user(self):
     action = self.create_alert_rule_trigger_action(
         target_identifier=six.text_type(self.user.id))
     incident = self.create_incident()
     handler = EmailActionHandler(action, incident, self.project)
     with self.tasks():
         handler.resolve()
     out = mail.outbox[0]
     assert out.to == [self.user.email]
     assert out.subject.startswith("Incident Alert Rule Resolved")
Ejemplo n.º 2
0
 def test_user(self):
     action = self.create_alert_rule_trigger_action(
         target_identifier=six.text_type(self.user.id)
     )
     incident = self.create_incident()
     handler = EmailActionHandler(action, incident, self.project)
     with self.tasks():
         incident.status = IncidentStatus.CLOSED.value
         handler.resolve()
     out = mail.outbox[0]
     assert out.to == [self.user.email]
     assert out.subject == u"[Resolved] {} - {}".format(incident.title, self.project.slug)