def markdoneFrames(self, **request): """Drops any dependency that requires any frame that matches the FrameSearch @type request: Dict @param request: FrameSearch parameters""" criteria = FrameSearch.criteriaFromOptions(**request) return self.stub.MarkDoneFrames(job_pb2.JobMarkDoneFramesRequest( job=self.data, req=criteria), timeout=Cuebot.Timeout)
def testMarkdoneFrames(self, getStubMock): stubMock = mock.Mock() stubMock.MarkDoneFrames.return_value = job_pb2.JobMarkDoneFramesResponse() getStubMock.return_value = stubMock frameRange = '1-10' criteria = opencue.search.FrameSearch.criteriaFromOptions(range=frameRange) job = opencue.wrappers.job.Job( job_pb2.Job(name=TEST_JOB_NAME)) job.markdoneFrames(range=frameRange) stubMock.MarkDoneFrames.assert_called_with( job_pb2.JobMarkDoneFramesRequest(job=job.data, req=criteria), timeout=mock.ANY)