From 65c64ebc08d75092151e828fab0fa73f5fd22e45 Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Mon, 1 Jan 2018 16:15:22 +0100 Subject: Add support for user/group/project filter by custom attribute Closes #367 --- tools/python_test_v4.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/python_test_v4.py') diff --git a/tools/python_test_v4.py b/tools/python_test_v4.py index 4af9ea9..e065020 100644 --- a/tools/python_test_v4.py +++ b/tools/python_test_v4.py @@ -129,6 +129,7 @@ assert(len(new_user.emails.list()) == 0) attrs = new_user.customattributes.list() assert(len(attrs) == 0) attr = new_user.customattributes.set('key', 'value1') +assert(len(gl.users.list(custom_attributes={'key': 'value1'})) == 1) assert(attr.key == 'key') assert(attr.value == 'value1') assert(len(new_user.customattributes.list()) == 1) @@ -234,6 +235,7 @@ group2.members.delete(gl.user.id) attrs = group2.customattributes.list() assert(len(attrs) == 0) attr = group2.customattributes.set('key', 'value1') +assert(len(gl.groups.list(custom_attributes={'key': 'value1'})) == 1) assert(attr.key == 'key') assert(attr.value == 'value1') assert(len(group2.customattributes.list()) == 1) @@ -303,6 +305,7 @@ assert(l1[0].id != l2[0].id) attrs = admin_project.customattributes.list() assert(len(attrs) == 0) attr = admin_project.customattributes.set('key', 'value1') +assert(len(gl.projects.list(custom_attributes={'key': 'value1'})) == 1) assert(attr.key == 'key') assert(attr.value == 'value1') assert(len(admin_project.customattributes.list()) == 1) -- cgit v1.2.1