def registerOutputPath(self, outputPath): """Register an output with the given layer. The output paths are sent in the opencue email. @type outputPath: str @param outputPath: Output path to register """ self.stub.RegisterOutputPath( job_pb2.LayerRegisterOutputPathRequest(layer=self.data, spec=outputPath), timeout=Cuebot.Timeout)
def registerOutputPath(self, outputPath): """Registers an output path for the layer. Output paths are included in OpenCue alert emails. :type outputPath: str :param outputPath: output path to register """ self.stub.RegisterOutputPath(job_pb2.LayerRegisterOutputPathRequest( layer=self.data, spec=outputPath), timeout=Cuebot.Timeout)
def testRegisterOutputPath(self, getStubMock): stubMock = mock.Mock() stubMock.RegisterOutputPath.return_value = job_pb2.LayerRegisterOutputPathResponse() getStubMock.return_value = stubMock outputPath = '/test/output/path' layer = opencue.wrappers.layer.Layer( job_pb2.Layer(name=TEST_LAYER_NAME)) layer.registerOutputPath(outputPath) stubMock.RegisterOutputPath.assert_called_with( job_pb2.LayerRegisterOutputPathRequest(layer=layer.data, spec=outputPath), timeout=mock.ANY)