From: Mukund Sivaraman Date: Thu, 15 Nov 2012 06:23:07 +0000 (+0530) Subject: [2353] Rewrite test_start_simple() to use MockBob2 X-Git-Tag: bind10-1.0.0-beta-release~19^2~81 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da1b2d7dc0a367ed168b366df1ab5c5af82260d4;p=thirdparty%2Fkea.git [2353] Rewrite test_start_simple() to use MockBob2 --- diff --git a/src/bin/bind10/tests/bind10_test.py.in b/src/bin/bind10/tests/bind10_test.py.in index 27f79827a5..4fb609c30b 100644 --- a/src/bin/bind10/tests/bind10_test.py.in +++ b/src/bin/bind10/tests/bind10_test.py.in @@ -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.