Esempio n. 1
0
    def testPause(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.Pause.return_value = job_pb2.JobPauseResponse()
        getStubMock.return_value = stubMock

        job = opencue.wrappers.job.Job(job_pb2.Job(name=TEST_JOB_NAME))
        job.pause()

        stubMock.Pause.assert_called_with(
            job_pb2.JobPauseRequest(job=job.data), timeout=mock.ANY)
Esempio n. 2
0
 def pause(self):
     """Pauses the job."""
     self.stub.Pause(job_pb2.JobPauseRequest(job=self.data),
                     timeout=Cuebot.Timeout)