]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2353] Rewrite test_start_simple() to use MockBob2
authorMukund Sivaraman <muks@isc.org>
Thu, 15 Nov 2012 06:23:07 +0000 (11:53 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 15 Nov 2012 06:23:07 +0000 (11:53 +0530)
src/bin/bind10/tests/bind10_test.py.in

index 27f79827a565f49c75cedb48b4dd55b6af4b78f1..4fb609c30b96b5e0e7e18e6773d20c23d240521d 100644 (file)
@@ -1480,24 +1480,20 @@ class TestBossComponents(unittest.TestCase):
 
     def test_start_simple(self):
         '''Test simple process startup.'''
-        bob = BoB()
+        bob = MockBob2()
         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)
+        bob.start_simple('/bin/true')
+        self.assertEqual('/bin/true', bob.started_process_name)
+        self.assertEqual(['/bin/true'], bob.started_process_args)
 
         # 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)
+        bob.start_simple('/bin/true')
+        self.assertEqual('/bin/true', bob.started_process_name)
+        self.assertEqual(['/bin/true', '-v'], bob.started_process_args)
 
     # there is another test with this name (minus the digits), but both
     # do different things.