diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2017-11-04 09:10:40 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2017-11-04 09:10:40 +0100 |
commit | 4fb2e439803bd55868b91827a5fbaa448f1dff56 (patch) | |
tree | d34db7c329b2d9e1a684fb1d7429014c9500d317 /tools/python_test_v4.py | |
parent | 32f7e17208987fa345670421c333e22ae6aced6a (diff) | |
download | gitlab-4fb2e439803bd55868b91827a5fbaa448f1dff56.tar.gz |
Add users custome attributes support
Diffstat (limited to 'tools/python_test_v4.py')
-rw-r--r-- | tools/python_test_v4.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/python_test_v4.py b/tools/python_test_v4.py index 0b1793a..fa83228 100644 --- a/tools/python_test_v4.py +++ b/tools/python_test_v4.py @@ -131,6 +131,20 @@ assert(len(new_user.emails.list()) == 1) email.delete() assert(len(new_user.emails.list()) == 0) +# custom attributes +attrs = new_user.customattributes.list() +assert(len(attrs) == 0) +attr = new_user.customattributes.set('key', 'value1') +assert(attr.key == 'key') +assert(attr.value == 'value1') +assert(len(new_user.customattributes.list()) == 1) +attr = new_user.customattributes.set('key', 'value2') +attr = new_user.customattributes.get('key') +assert(attr.value == 'value2') +assert(len(new_user.customattributes.list()) == 1) +attr.delete() +assert(len(new_user.customattributes.list()) == 0) + new_user.delete() foobar_user.delete() assert(len(gl.users.list()) == 3) |