Ejemplo n.º 1
0
Archivo: cli.py Proyecto: sssst315/beah
 def set_controller(self, controller=None):
     ExtBackend.set_controller(self, controller)
     if controller:
         #controller.proc_cmd(self, command.ping("Are you there?"))
         controller.proc_cmd(self, command.no_output())
         controller.proc_cmd(self, self.cmd)
         self.wait = True
Ejemplo n.º 2
0
 def set_controller(self, controller=None):
     ExtBackend.set_controller(self, controller)
     if controller:
         #controller.proc_cmd(self, command.ping("Are you there?"))
         controller.proc_cmd(self, command.no_output())
         controller.proc_cmd(self, self.cmd)
         self.wait = True
Ejemplo n.º 3
0
    def testMain(self):

        be = backends.CmdOnlyBackend()
        be.set_controller(FakeController(test_case=self, expected=command.no_output()))

        def test(be, input, output):
            be.controller.expected = output
            be.proc_input(input)

        test(be, 'ping', command.ping())
        test(be, 'PING a message', command.PING('a message'))
        test(be, 'run a_task', command.run('a_task'))
Ejemplo n.º 4
0
 def set_controller(self, controller=None):
     ExtBackend.set_controller(self, controller)
     if controller:
         self.__status = self._CONNECTED
         # FIXME: implement proper output filterring instead of no_output:
         controller.proc_cmd(self, command.no_output())
         for cid in self.__queue:
             cmd, d = self.__pending[cid]
             controller.proc_cmd(self, cmd)
             reactor.callLater(self.TIMEOUT, self.timeout, cid)
     else:
         self.__status = self._IDLE
Ejemplo n.º 5
0
 def set_controller(self, controller=None):
     ExtBackend.set_controller(self, controller)
     if controller:
         self.__status = self._CONNECTED
         # FIXME: implement proper output filterring instead of no_output:
         controller.proc_cmd(self, command.no_output())
         for cid in self.__queue:
             cmd, d = self.__pending[cid]
             controller.proc_cmd(self, cmd)
             reactor.callLater(self.TIMEOUT, self.timeout, cid)
     else:
         self.__status = self._IDLE
Ejemplo n.º 6
0
    def testMain(self):

        be = backends.CmdOnlyBackend()
        be.set_controller(
            FakeController(test_case=self, expected=command.no_output()))

        def test(be, input, output):
            be.controller.expected = output
            be.proc_input(input)

        test(be, 'ping', command.ping())
        test(be, 'PING a message', command.PING('a message'))
        test(be, 'run a_task', command.run('a_task'))
Ejemplo n.º 7
0
 def set_controller(self, controller=None):
     CmdBackend.set_controller(self, controller)
     if controller:
         self.controller.proc_cmd(self, command.no_output())
Ejemplo n.º 8
0
 def set_controller(self, controller=None):
     CmdBackend.set_controller(self, controller)
     if controller:
         self.controller.proc_cmd(self, command.no_output())