From: Mukund Sivaraman Date: Tue, 6 Nov 2012 07:31:23 +0000 (+0530) Subject: [2353] Add test for BoB.get_processes() X-Git-Tag: bind10-1.0.0-beta-release~19^2~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ba306a2e14dd31e1bf8350c2d27b9741af7e101;p=thirdparty%2Fkea.git [2353] Add test for BoB.get_processes() --- diff --git a/src/bin/bind10/tests/bind10_test.py.in b/src/bin/bind10/tests/bind10_test.py.in index 3caa691506..3ab8bffa8a 100644 --- a/src/bin/bind10/tests/bind10_test.py.in +++ b/src/bin/bind10/tests/bind10_test.py.in @@ -1346,6 +1346,16 @@ class TestBossComponents(unittest.TestCase): self.assertFalse(component.restarted) self.assertFalse(component in bob.components_to_restart) + def test_get_processes(self): + '''Test that procsses are returned correctly.''' + bob = MockBob() + bob.runnable = True + component = MockComponent('test', 53, 'Test') + bob.components[53] = component + + process_list = bob.get_processes() + self.assertEqual([[53, 'test', 'Test']], process_list) + def test_reap_children(self): '''Test that children are queued to be restarted when they ask for it.''' bob = MockBob()