| Total Complexity | 4 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import unittest |
||
| 2 | from helpers.queuehelper import QueueName |
||
| 3 | |||
| 4 | class TestQueuenames(unittest.TestCase): |
||
| 5 | def test_queue_valid_name(self): |
||
| 6 | self.assertTrue(QueueName.has_value(QueueName.Q_ALERT.value)) |
||
| 7 | |||
| 8 | def test_queue_invalid_name(self): |
||
| 9 | self.assertFalse(QueueName.has_value('notaqueuename')) |
||
| 10 | |||
| 11 | def test_queue_alert(self): |
||
| 12 | self.assertTrue(str(QueueName.Q_ALERT) == 'q_alert') |
||
| 13 | |||
| 14 | def test_queue_value(self): |
||
| 15 | self.assertTrue(QueueName.value(QueueName.Q_ALERT) == 'alert') |
||
| 16 | |||
| 17 | if __name__ == '__main__': |
||
| 18 | unittest.main() |
||
| 19 |