Ejemplo n.º 1
0
 def test_alarm(self):
     ct = get_severity_level_from_string('Alarm')
     self.assertEqual(ct, SeverityLevel.ALARM)
Ejemplo n.º 2
0
 def test_debug(self):
     ct = get_severity_level_from_string('Debug')
     self.assertEqual(ct, SeverityLevel.DEBUG)
Ejemplo n.º 3
0
 def test_log(self):
     ct = get_severity_level_from_string('Log')
     self.assertEqual(ct, SeverityLevel.LOG)
Ejemplo n.º 4
0
 def test_medium(self):
     ct = get_severity_level_from_string('Medium')
     self.assertEqual(ct, SeverityLevel.MEDIUM)
Ejemplo n.º 5
0
 def test_high(self):
     ct = get_severity_level_from_string('High')
     self.assertEqual(ct, SeverityLevel.HIGH)
Ejemplo n.º 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)
Ejemplo n.º 7
0
 def test_invalid(self):
     with self.assertRaises(InvalidArgument):
         get_severity_level_from_string('foo')