BIND 10 trac2353, updated. 4f806512c8b2a99f3b1dc43fda7130ec81d21c1f [2353] Restore isc.config.ModuleCCSession during tearDown()

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Dec 6 02:47:13 UTC 2012


The branch, trac2353 has been updated
       via  4f806512c8b2a99f3b1dc43fda7130ec81d21c1f (commit)
      from  87cd15b3cc34738753d97e62a07681b245350f25 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4f806512c8b2a99f3b1dc43fda7130ec81d21c1f
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Dec 6 08:17:01 2012 +0530

    [2353] Restore isc.config.ModuleCCSession during tearDown()

-----------------------------------------------------------------------

Summary of changes:
 src/bin/bind10/tests/bind10_test.py.in |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/bind10/tests/bind10_test.py.in b/src/bin/bind10/tests/bind10_test.py.in
index 2bf16ca..1723d33 100644
--- a/src/bin/bind10/tests/bind10_test.py.in
+++ b/src/bin/bind10/tests/bind10_test.py.in
@@ -1233,14 +1233,15 @@ class TestBossComponents(unittest.TestCase):
         }
         self._tmp_time = None
         self._tmp_sleep = None
+        self._tmp_ccsession = None
 
     def tearDown(self):
         if self._tmp_time is not None:
             time.time = self._tmp_time
         if self._tmp_sleep is not None:
             time.sleep = self._tmp_sleep
-
-
+        if self._tmp_ccsession is not None:
+            isc.config.ModuleCCSession = self._tmp_ccsession
 
     def __unary_hook(self, param):
         """
@@ -1760,7 +1761,7 @@ class TestBossComponents(unittest.TestCase):
             def start(self):
                 self.started = True
         bob = MockBobSimple()
-        tmp = isc.config.ModuleCCSession
+        self._tmp_ccsession = isc.config.ModuleCCSession
         isc.config.ModuleCCSession = DummySession
 
         bob.start_ccsession({})
@@ -1770,7 +1771,7 @@ class TestBossComponents(unittest.TestCase):
         self.assertEqual(bob.msgq_socket_file, bob.ccs.socket_file)
         self.assertTrue(bob.ccs.started)
 
-        isc.config.ModuleCCSession = tmp
+        # isc.config.ModuleCCSession is restored during tearDown().
 
     def test_start_process(self):
         '''Test that processes can be started.'''



More information about the bind10-changes mailing list