Exemple #1
0
    def testKill(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.Delete.return_value = job_pb2.JobKillResponse()
        getStubMock.return_value = stubMock

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

        stubMock.Kill.assert_called_with(job_pb2.JobKillRequest(job=job.data),
                                         timeout=mock.ANY)
Exemple #2
0
 def kill(self):
     """Kills the job."""
     self.stub.Kill(job_pb2.JobKillRequest(job=self.data),
                    timeout=Cuebot.Timeout)