def getOutputPaths(self): """Return the output paths for this layer. @rtype: list<str> @return: list of output paths""" return self.stub.GetOutputPaths( job_pb2.LayerGetOutputPathsRequest(layer=self.data), timeout=Cuebot.Timeout).output_paths
def testGetOutputPaths(self, getStubMock): stubMock = mock.Mock() stubMock.GetOutputPaths.return_value = job_pb2.LayerGetOutputPathsResponse( output_paths=[TEST_OUTPUT_PATH]) getStubMock.return_value = stubMock layer = opencue.wrappers.layer.Layer( job_pb2.Layer(name=TEST_LAYER_NAME)) outputPaths = layer.getOutputPaths() stubMock.GetOutputPaths.assert_called_with( job_pb2.LayerGetOutputPathsRequest(layer=layer.data), timeout=mock.ANY) self.assertEqual(len(outputPaths), 1) self.assertEqual(outputPaths[0], TEST_OUTPUT_PATH)