Parcourir la source

[2353] Test verbose case of BoB.start_cmdctl()

Mukund Sivaraman il y a 12 ans
Parent
commit
4f52e898a7
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. 9 0
      src/bin/bind10/tests/bind10_test.py.in

+ 9 - 0
src/bin/bind10/tests/bind10_test.py.in

@@ -1537,10 +1537,19 @@ class TestBossComponents(unittest.TestCase):
         '''Test that b10-cmdctl is started.'''
         bob = MockBobSimple()
         bob.c_channel_env = {}
+
+        # non-verbose case
+        bob.verbose = False
         bob.start_cmdctl()
         self.assertEqual('b10-cmdctl', bob.started_process_name)
         self.assertEqual(['b10-cmdctl'], bob.started_process_args)
 
+        # verbose case
+        bob.verbose = True
+        bob.start_cmdctl()
+        self.assertEqual('b10-cmdctl', bob.started_process_name)
+        self.assertEqual(['b10-cmdctl', '-v'], bob.started_process_args)
+
 class SocketSrvTest(unittest.TestCase):
     """
     This tests some methods of boss related to the unix domain sockets used