diff options
author | John L. Villalovos <john@sodarock.com> | 2021-11-26 11:54:33 -0800 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2021-11-26 20:19:51 -0800 |
commit | 68ff595967a5745b369a93d9d18fef48b65ebedb (patch) | |
tree | 724ae3c4d49af69a7345a916009867c35d976b01 /tests/functional/api/test_projects.py | |
parent | 8d4c95358c9e61c1cfb89562252498093f56d269 (diff) | |
download | gitlab-jlvillal/project_groups.tar.gz |
feat: add support for `projects.groups.list()`jlvillal/project_groups
Add support for `projects.groups.list()` endpoint.
Closes #1717
Diffstat (limited to 'tests/functional/api/test_projects.py')
-rw-r--r-- | tests/functional/api/test_projects.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/functional/api/test_projects.py b/tests/functional/api/test_projects.py index 3a317d5..4cd9515 100644 --- a/tests/functional/api/test_projects.py +++ b/tests/functional/api/test_projects.py @@ -311,3 +311,21 @@ def test_project_wiki(project): wiki.save() wiki.delete() assert len(project.wikis.list()) == 0 + + +def test_project_groups_list(gl, group): + """Test listing groups of a project""" + # Create a subgroup of our top-group, we will place our new project inside + # this group. + group2 = gl.groups.create( + {"name": "group2_proj", "path": "group2_proj", "parent_id": group.id} + ) + data = { + "name": "test-project-tpsg", + "namespace_id": group2.id, + } + project = gl.projects.create(data) + + groups = project.groups.list() + group_ids = set([x.id for x in groups]) + assert set((group.id, group2.id)) == group_ids |