From 1af44ce8761e6ee8a9467a3e192f6c4d19e5cefe Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Wed, 27 Jul 2022 16:08:25 -0700 Subject: fix: use the [] after key names for array variables in `params` 1. If a value is of type ArrayAttribute then append '[]' to the name of the value for query parameters (`params`). This is step 3 in a series of steps of our goal to add full support for the GitLab API data types[1]: * array * hash * array of hashes Step one was: commit 5127b1594c00c7364e9af15e42d2e2f2d909449b Step two was: commit a57334f1930752c70ea15847a39324fa94042460 Fixes: #1698 [1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types --- tests/functional/api/test_groups.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/functional/api/test_groups.py') diff --git a/tests/functional/api/test_groups.py b/tests/functional/api/test_groups.py index 88e5a36..7688273 100644 --- a/tests/functional/api/test_groups.py +++ b/tests/functional/api/test_groups.py @@ -99,6 +99,11 @@ def test_groups(gl): assert len(group1.members.list()) == 3 assert len(group2.members.list()) == 2 + # Test `user_ids` array + result = group1.members.list(user_ids=[user.id, 99999]) + assert len(result) == 1 + assert result[0].id == user.id + group1.members.delete(user.id) assert user not in group1.members.list() assert group1.members_all.list() -- cgit v1.2.1