Пример #1
0
 def test_status_closed(self):
     """
     When alert Clears or becomes Normal, then status is Closed
     """
     self.assertEquals(severity_code.status_from_severity(severity_code.CRITICAL, severity_code.CLEARED), status_code.CLOSED)
     self.assertEquals(severity_code.status_from_severity(severity_code.WARNING, severity_code.CLEARED), status_code.CLOSED)
     self.assertEquals(severity_code.status_from_severity(severity_code.UNKNOWN, severity_code.NORMAL), status_code.CLOSED)
     self.assertEquals(severity_code.status_from_severity(severity_code.DEBUG, severity_code.CLEARED), status_code.CLOSED)
     self.assertEquals(severity_code.status_from_severity(severity_code.AUTH, severity_code.NORMAL), status_code.CLOSED)
Пример #2
0
 def test_status_reopen(self):
     """
     When trendIndication is moreSevere, status should be set to Open
     """
     self.assertEquals(
         severity_code.status_from_severity(severity_code.MINOR,
                                            severity_code.MAJOR,
                                            status_code.ACK),
         status_code.OPEN)
     self.assertEquals(
         severity_code.status_from_severity(severity_code.NORMAL,
                                            severity_code.MAJOR,
                                            status_code.CLOSED),
         status_code.OPEN)
Пример #3
0
 def test_status_no_change(self):
     """
     When trendIndication is lessSevere, status should not change
     """
     self.assertEquals(
         severity_code.status_from_severity(severity_code.NORMAL,
                                            severity_code.UNKNOWN,
                                            status_code.OPEN),
         status_code.OPEN)
Пример #4
0
 def test_status_closed(self):
     """
     When alert Clears or becomes Normal, then status is Closed
     """
     self.assertEquals(
         severity_code.status_from_severity(severity_code.CRITICAL,
                                            severity_code.CLEARED),
         status_code.CLOSED)
     self.assertEquals(
         severity_code.status_from_severity(severity_code.WARNING,
                                            severity_code.CLEARED),
         status_code.CLOSED)
     self.assertEquals(
         severity_code.status_from_severity(severity_code.UNKNOWN,
                                            severity_code.NORMAL),
         status_code.CLOSED)
     self.assertEquals(
         severity_code.status_from_severity(severity_code.DEBUG,
                                            severity_code.CLEARED),
         status_code.CLOSED)
     self.assertEquals(
         severity_code.status_from_severity(severity_code.AUTH,
                                            severity_code.NORMAL),
         status_code.CLOSED)
Пример #5
0
 def test_status_reopen(self):
     """
     When trendIndication is moreSevere, status should be set to Open
     """
     self.assertEquals(severity_code.status_from_severity(severity_code.MINOR, severity_code.MAJOR, status_code.ACK), status_code.OPEN)
     self.assertEquals(severity_code.status_from_severity(severity_code.NORMAL, severity_code.MAJOR, status_code.CLOSED), status_code.OPEN)
Пример #6
0
 def test_status_no_change(self):
     """
     When trendIndication is lessSevere, status should not change
     """
     self.assertEquals(severity_code.status_from_severity(severity_code.NORMAL, severity_code.UNKNOWN, status_code.OPEN), status_code.OPEN)