def testKill(self, getStubMock): stubMock = mock.Mock() stubMock.Kill.return_value = job_pb2.FrameKillResponse() getStubMock.return_value = stubMock frame = opencue.wrappers.frame.Frame( job_pb2.Frame(name=TEST_FRAME_NAME, state=job_pb2.RUNNING)) frame.kill() stubMock.Kill.assert_called_with( job_pb2.FrameKillRequest(frame=frame.data), timeout=mock.ANY)
def kill(self): """Kills the frame.""" if self.data.state == job_pb2.FrameState.Value('RUNNING'): self.stub.Kill(job_pb2.FrameKillRequest(frame=self.data), timeout=Cuebot.Timeout)