示例#1
0
 def test_alarm(self):
     ct = get_severity_level_from_string('Alarm')
     self.assertEqual(ct, SeverityLevel.ALARM)
示例#2
0
 def test_debug(self):
     ct = get_severity_level_from_string('Debug')
     self.assertEqual(ct, SeverityLevel.DEBUG)
示例#3
0
 def test_log(self):
     ct = get_severity_level_from_string('Log')
     self.assertEqual(ct, SeverityLevel.LOG)
示例#4
0
 def test_medium(self):
     ct = get_severity_level_from_string('Medium')
     self.assertEqual(ct, SeverityLevel.MEDIUM)
示例#5
0
 def test_high(self):
     ct = get_severity_level_from_string('High')
     self.assertEqual(ct, SeverityLevel.HIGH)
示例#6
0
 def test_none_or_empty(self):
     ct = get_severity_level_from_string(None)
     self.assertIsNone(ct)
     ct = get_severity_level_from_string('')
     self.assertIsNone(ct)
示例#7
0
 def test_invalid(self):
     with self.assertRaises(InvalidArgument):
         get_severity_level_from_string('foo')