Exemplo n.º 1
0
 def setUp(self):
     sys.argv = sys.argv[:1]
     path = "config/ipc"
     ConfigurationManager(cwd=path)
     SignalExchangeHub()
     ExecutionOrganiser().bindInterface()
     self.sc = StateControl("me")
Exemplo n.º 2
0
class TestInit(unittest.TestCase):
    def setUp(self):
        sys.argv = sys.argv[:1]
        path = "config/ipc"
        ConfigurationManager(cwd=path)
        SignalExchangeHub()
        ExecutionOrganiser().bindInterface()
        self.sc = StateControl("me")
    def tearDown(self):
        ExecutionOrganiser.destroySingleton()
    def testWithArgs(self):
        tId = 123
        bSynchronous = True
        try:
            self.sc._handler_init(tId, bSynchronous, None)
        except TypeError, _e:
            assert True
        else:
Exemplo n.º 3
0
 def setUp(self):
     path = "config/ipc"
     sys.argv = sys.argv[:1]
     ConfigurationManager(cwd=path)
     SignalExchangeHub()
     eo = ExecutionOrganiser()
     eo.bindInterface()
     eo.createProcess()
     self.sc = StateControl("me")
Exemplo n.º 4
0
class TestStop(unittest.TestCase):
    def setUp(self):
        path = "config/ipc"
        sys.argv = sys.argv[:1]
        ConfigurationManager(cwd=path)
        SignalExchangeHub()
        eo = ExecutionOrganiser()
        eo.bindInterface()
        eo.createProcess()
        self.sc = StateControl("me")
    def tearDown(self):
        ExecutionOrganiser.destroySingleton()
    def testNoArgs(self):
        tId = 123
        bSynchronous = True
        result = self.sc._handler_stop(tId, bSynchronous)
        assert isinstance(result, iApiTransportResponse)
        assert eStateControlResult.isValid(result.response())