Browse Source

[2353] Add test for BoB.get_processes()

Mukund Sivaraman 12 years ago
parent
commit
7ba306a2e1
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/bin/bind10/tests/bind10_test.py.in

+ 10 - 0
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()