Beispiel #1
0
 def getFrame(self):
     """Return the frame this proc is running.
     @rtype:  Frame
     @return: The fame this proc is running."""
     response = self.stub.GetFrame(
         host_pb2.ProcGetFrameRequest(proc=self.data),
         timeout=Cuebot.Timeout)
     return opencue.wrappers.frame.Frame(response.frame)
Beispiel #2
0
    def testGetFrame(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.GetFrame.return_value = host_pb2.ProcGetFrameResponse(
            frame=job_pb2.Frame(layer_name=TEST_LAYER_NAME))
        getStubMock.return_value = stubMock

        proc = opencue.wrappers.proc.Proc(host_pb2.Proc(name=TEST_PROC_NAME))
        frame = proc.getFrame()

        stubMock.GetFrame.assert_called_with(
            host_pb2.ProcGetFrameRequest(proc=proc.data), timeout=mock.ANY)
        self.assertEqual(frame.layer(), TEST_LAYER_NAME)