import errno
from isc.testutils.parse_args import TestOptParser, OptsError
+from isc.testutils.ccsession_mock import MockModuleCCSession
class TestProcessInfo(unittest.TestCase):
def setUp(self):
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.
bob._component_configurator.shutdown = self.__nullary_hook
self.__called = False
- bob.ccs = MockCCSession()
+ bob.ccs = MockModuleCCSession()
self.assertFalse(bob.ccs.stopped)
bob.shutdown()