]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2353] Add test for BoB.get_processes()
authorMukund Sivaraman <muks@isc.org>
Tue, 6 Nov 2012 07:31:23 +0000 (13:01 +0530)
committerMukund Sivaraman <muks@isc.org>
Tue, 6 Nov 2012 07:31:23 +0000 (13:01 +0530)
src/bin/bind10/tests/bind10_test.py.in

index 3caa69150666d209934fedb81ef4786d60be948e..3ab8bffa8a1fa6f2ecc0ba002aa5f5452eb5b641 100644 (file)
@@ -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()