From: Mukund Sivaraman Date: Mon, 10 Dec 2012 01:13:07 +0000 (+0530) Subject: [2353] Rename and document BoB._run_under_unittests X-Git-Tag: bind10-1.0.0-beta-release~19^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32011f9a367b479a983dbb32e877590b18fbc275;p=thirdparty%2Fkea.git [2353] Rename and document BoB._run_under_unittests --- diff --git a/src/bin/bind10/bind10_src.py.in b/src/bin/bind10/bind10_src.py.in index 00bdb92728..e626d7999c 100755 --- a/src/bin/bind10/bind10_src.py.in +++ b/src/bin/bind10/bind10_src.py.in @@ -217,7 +217,11 @@ class BoB: self.cmdctl_port = cmdctl_port self.wait_time = wait_time self.msgq_timeout = 5 - self.run_under_unittests = False + + # _run_under_unittests is only meant to be used when testing. It + # bypasses execution of some code to help with testing. + self._run_under_unittests = False + self._component_configurator = isc.bind10.component.Configurator(self, isc.bind10.special_component.get_specials()) # The priorities here make them start in the correct order. First @@ -437,7 +441,7 @@ class BoB: cc_connect_start = time.time() while self.cc_session is None: # if we are run under unittests, break - if self.run_under_unittests: + if self._run_under_unittests: break # if we have been trying for "a while" give up diff --git a/src/bin/bind10/tests/bind10_test.py.in b/src/bin/bind10/tests/bind10_test.py.in index 917e133915..1e424cc49e 100644 --- a/src/bin/bind10/tests/bind10_test.py.in +++ b/src/bin/bind10/tests/bind10_test.py.in @@ -1595,7 +1595,7 @@ class TestBossComponents(unittest.TestCase): '''Test that b10-msgq is started.''' bob = MockBobSimple() bob.c_channel_env = {'FOO': 'an env string'} - bob.run_under_unittests = True + bob._run_under_unittests = True # use the MockProcessInfo creator bob._make_process_info = bob._make_mock_process_info @@ -1613,7 +1613,7 @@ class TestBossComponents(unittest.TestCase): bob.c_channel_env = {} # keep the timeout small for the test to complete quickly bob.msgq_timeout = 1 - bob.run_under_unittests = False + bob._run_under_unittests = False # use the MockProcessInfo creator bob._make_process_info = bob._make_mock_process_info