Browse Source

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

Mukund Sivaraman 12 years ago
parent
commit
d5c0c97ef8
1 changed files with 11 additions and 1 deletions
  1. 11 1
      src/bin/bind10/tests/bind10_test.py.in

+ 11 - 1
src/bin/bind10/tests/bind10_test.py.in

@@ -1481,14 +1481,24 @@ class TestBossComponents(unittest.TestCase):
     def test_start_simple(self):
         '''Test simple process startup.'''
         bob = BoB()
-        bob.verbose = False
         bob.c_channel_env = {}
+
+        # non-verbose case
+        bob.verbose = False
         pi = bob.start_simple('/bin/true')
         self.assertEqual('/bin/true', pi.name)
         self.assertEqual(['/bin/true'], pi.args)
         self.assertEqual({}, pi.env)
         self.assertNotEqual(0, pi.pid)
 
+        # verbose case
+        bob.verbose = True
+        pi = bob.start_simple('/bin/true')
+        self.assertEqual('/bin/true', pi.name)
+        self.assertEqual(['/bin/true', '-v'], pi.args)
+        self.assertEqual({}, pi.env)
+        self.assertNotEqual(0, pi.pid)
+
     # there is another test with this name (minus the digits), but both
     # do different things.
     def test_start_auth2(self):