def create_fake_remote_command(*args, **kwargs): cmd = remotecommand.FakeRemoteCommand(*args, **kwargs) cmd.testcase = self if self._next_remote_command_number in self._interrupt_remote_command_numbers: cmd.set_run_interrupt() self._next_remote_command_number += 1 return cmd
def makeRemoteCommand(self, rc, stdout, stderr=''): cmd = fakeremotecommand.FakeRemoteCommand('cmd', {}) cmd.fakeLogData(self, 'stdio', stdout=stdout, stderr=stderr) cmd.rc = rc return cmd
def makeRemoteCommand(self, name, args): return remotecommand.FakeRemoteCommand(name, args)