summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/gl_objects/features.rst4
-rw-r--r--gitlab/v4/objects.py4
-rw-r--r--tools/python_test_v4.py2
3 files changed, 8 insertions, 2 deletions
diff --git a/docs/gl_objects/features.rst b/docs/gl_objects/features.rst
index 201d072..9f5e685 100644
--- a/docs/gl_objects/features.rst
+++ b/docs/gl_objects/features.rst
@@ -24,3 +24,7 @@ Create or set a feature::
feature = gl.features.set(feature_name, True)
feature = gl.features.set(feature_name, 30)
+
+Delete a feature::
+
+ feature.delete()
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 6c0c84f..45d01a0 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -462,11 +462,11 @@ class DockerfileManager(RetrieveMixin, RESTManager):
_obj_cls = Dockerfile
-class Feature(RESTObject):
+class Feature(ObjectDeleteMixin, RESTObject):
_id_attr = 'name'
-class FeatureManager(ListMixin, RESTManager):
+class FeatureManager(ListMixin, DeleteMixin, RESTManager):
_path = '/features/'
_obj_cls = Feature
diff --git a/tools/python_test_v4.py b/tools/python_test_v4.py
index 37f657a..1527c2e 100644
--- a/tools/python_test_v4.py
+++ b/tools/python_test_v4.py
@@ -665,6 +665,8 @@ assert(ns.kind == 'user')
feat = gl.features.set('foo', 30)
assert(feat.name == 'foo')
assert(len(gl.features.list()) == 1)
+feat.delete()
+assert(len(gl.features.list()) == 0)
# broadcast messages
msg = gl.broadcastmessages.create({'message': 'this is the message'})