示例#1
0
 def test_updated_secinfo_arrived(self):
     ct = get_alert_event_from_string('Updated SecInfo arrived')
     self.assertEqual(ct, AlertEvent.UPDATED_SECINFO_ARRIVED)
示例#2
0
 def test_new_secinfo_arrived(self):
     ct = get_alert_event_from_string('New SecInfo arrived')
     self.assertEqual(ct, AlertEvent.NEW_SECINFO_ARRIVED)
示例#3
0
 def test_none_or_empty(self):
     ct = get_alert_event_from_string(None)
     self.assertIsNone(ct)
     ct = get_alert_event_from_string('')
     self.assertIsNone(ct)
示例#4
0
 def test_task_run_status_changed(self):
     ct = get_alert_event_from_string('Task run status changed')
     self.assertEqual(ct, AlertEvent.TASK_RUN_STATUS_CHANGED)
示例#5
0
 def test_invalid(self):
     with self.assertRaises(InvalidArgument):
         get_alert_event_from_string('foo')