def setTags(self, tags): """Sets the tags, TODO: update description of tag structure @type tags: list<str> @param tags: Layer tags""" return self.stub.SetTags(job_pb2.LayerSetTagsRequest(layer=self.data, tags=tags), timeout=Cuebot.Timeout)
def setTags(self, tags): """Sets the layer tags. :type tags: list<str> :param tags: layer tags """ return self.stub.SetTags(job_pb2.LayerSetTagsRequest(layer=self.data, tags=tags), timeout=Cuebot.Timeout)
def testSetTags(self, getStubMock): tags = ['cloud', 'local'] stubMock = mock.Mock() stubMock.SetTags.return_value = job_pb2.LayerSetTagsResponse() getStubMock.return_value = stubMock layer = opencue.wrappers.layer.Layer( job_pb2.Layer(name=TEST_LAYER_NAME)) layer.setTags(tags) stubMock.SetTags.assert_called_with( job_pb2.LayerSetTagsRequest(layer=layer.data, tags=tags), timeout=mock.ANY)