diff options
-rw-r--r-- | gitlab/v4/objects/__init__.py | 2 | ||||
-rw-r--r-- | tools/functional/api/test_projects.py | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/gitlab/v4/objects/__init__.py b/gitlab/v4/objects/__init__.py index edeff04..f42c60b 100644 --- a/gitlab/v4/objects/__init__.py +++ b/gitlab/v4/objects/__init__.py @@ -3601,7 +3601,7 @@ class ProjectLabel(SubscribableMixin, SaveMixin, ObjectDeleteMixin, RESTObject): class ProjectLabelManager( - ListMixin, CreateMixin, UpdateMixin, DeleteMixin, RESTManager + RetrieveMixin, CreateMixin, UpdateMixin, DeleteMixin, RESTManager ): _path = "/projects/%(project_id)s/labels" _obj_cls = ProjectLabel diff --git a/tools/functional/api/test_projects.py b/tools/functional/api/test_projects.py index 3e88c0c..945a6ec 100644 --- a/tools/functional/api/test_projects.py +++ b/tools/functional/api/test_projects.py @@ -139,8 +139,11 @@ def test_project_housekeeping(project): def test_project_labels(project): label = project.labels.create({"name": "label", "color": "#778899"}) - label = project.labels.list()[0] - assert len(project.labels.list()) == 1 + labels = project.labels.list() + assert len(labels) == 1 + + label = project.labels.get("label") + assert label == labels[0] label.new_name = "labelupdated" label.save() |