|
@@ -36,6 +36,7 @@ import isc.bind10.socket_cache
|
|
|
import errno
|
|
|
|
|
|
from isc.testutils.parse_args import TestOptParser, OptsError
|
|
|
+from isc.testutils.ccsession_mock import MockModuleCCSession
|
|
|
|
|
|
class TestProcessInfo(unittest.TestCase):
|
|
|
def setUp(self):
|
|
@@ -103,14 +104,6 @@ class TestProcessInfo(unittest.TestCase):
|
|
|
self.assertTrue(type(pi.pid) is int)
|
|
|
self.assertNotEqual(pi.pid, old_pid)
|
|
|
|
|
|
-class MockCCSession:
|
|
|
- """Simple test class to check whether 'shutdown' calls stop()"""
|
|
|
- def __init__(self):
|
|
|
- self.stopped = False
|
|
|
-
|
|
|
- def stop(self):
|
|
|
- self.stopped = True
|
|
|
-
|
|
|
class TestCacheCommands(unittest.TestCase):
|
|
|
"""
|
|
|
Test methods of boss related to the socket cache and socket handling.
|
|
@@ -1179,7 +1172,7 @@ class TestBossComponents(unittest.TestCase):
|
|
|
bob._component_configurator.shutdown = self.__nullary_hook
|
|
|
self.__called = False
|
|
|
|
|
|
- bob.ccs = MockCCSession()
|
|
|
+ bob.ccs = MockModuleCCSession()
|
|
|
self.assertFalse(bob.ccs.stopped)
|
|
|
|
|
|
bob.shutdown()
|