|
@@ -341,6 +341,19 @@ class TestBossComponents(unittest.TestCase):
|
|
|
|
|
|
bob._component_configurator.shutdown = orig
|
|
|
|
|
|
+ def test_component_shutdown(self):
|
|
|
+ """
|
|
|
+ Test the component_shutdown sets all variables accordingly.
|
|
|
+ """
|
|
|
+ bob = MockBob()
|
|
|
+ self.assertRaises(Exception, bob.component_shutdown, 1)
|
|
|
+ self.assertEqual(1, bob.exitcode)
|
|
|
+ bob._BoB__started = True
|
|
|
+ bob.runnable = True
|
|
|
+ bob.component_shutdown(2)
|
|
|
+ self.assertEqual(2, bob.exitcode)
|
|
|
+ self.assertFalse(bob.runnable)
|
|
|
+
|
|
|
def test_init_config(self):
|
|
|
"""
|
|
|
Test initial configuration is loaded.
|