Beispiel #1
0
 def markAsWaiting(self, **request):
     """Changes the matching frames from the depend state to the waiting state
     @type  request: Dict
     @param request: FrameSearch parameters"""
     criteria = FrameSearch.criteriaFromOptions(**request)
     return self.stub.MarkAsWaiting(job_pb2.JobMarkAsWaitingRequest(
         job=self.data, req=criteria),
                                    timeout=Cuebot.Timeout)
Beispiel #2
0
    def testMarkAsWaiting(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.MarkAsWaiting.return_value = job_pb2.JobMarkAsWaitingResponse()
        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.markAsWaiting(range=frameRange)

        stubMock.MarkAsWaiting.assert_called_with(
            job_pb2.JobMarkAsWaitingRequest(job=job.data, req=criteria), timeout=mock.ANY)