Passed
Push — master ( 400413...782306 )
by Dave
01:02
created

tests.test_bus   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 11
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A TestBus.test_bus_get_name_str() 0 3 1
A TestBus.test_bus_get_name_q() 0 3 1
1
import unittest
2
from helpers.queuehelper import QueueName
3
#from backend.fcmapp import InfrastructureService
4
from backend.fcmbus import Bus
5
6
class TestBus(unittest.TestCase):
7
    #@classmethod
8
    #def make_bus(self):
9
    #    return Bus(InfrastructureService('', '', '', '', '', ''))
10
11
    def test_bus_get_name_q(self):
12
        #bus = Test_bus.make_bus()
13
        self.assertTrue(Bus.get_queue_name(QueueName.Q_ALERT) == "alert")
14
15
    def test_bus_get_name_str(self):
16
        #bus = Test_bus.make_bus()
17
        self.assertTrue(Bus.get_queue_name("alert") == "alert")
18
19
if __name__ == '__main__':
20
    unittest.main()
21