def testEat(self, getStubMock): stubMock = mock.Mock() stubMock.Eat.return_value = job_pb2.FrameEatResponse() getStubMock.return_value = stubMock frame = opencue.wrappers.frame.Frame( job_pb2.Frame(name=TEST_FRAME_NAME, state=job_pb2.WAITING)) frame.eat() stubMock.Eat.assert_called_with( job_pb2.FrameEatRequest(frame=frame.data), timeout=mock.ANY)
def eat(self): """Eats the frame.""" if self.data.state != job_pb2.FrameState.Value('EATEN'): self.stub.Eat(job_pb2.FrameEatRequest(frame=self.data), timeout=Cuebot.Timeout)