summaryrefslogtreecommitdiff
path: root/gitlab/tests
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-04-27 00:40:35 +0200
committerGitHub <noreply@github.com>2021-04-27 00:40:35 +0200
commitdde01c70c2bbac4d1b35211b81347f4363219777 (patch)
treedac8c4e62def4b17c30478c363e537d9ebba8e17 /gitlab/tests
parent5b81d7d25e5deefa4333098ebb5bc646fcee2c8d (diff)
parent115938b3e5adf9a2fb5ecbfb34d9c92bf788035e (diff)
downloadgitlab-dde01c70c2bbac4d1b35211b81347f4363219777.tar.gz
Merge pull request #1415 from JohnVillalovos/jlvillal/list_attribute_int
feat: add support for lists of integers to ListAttribute
Diffstat (limited to 'gitlab/tests')
-rw-r--r--gitlab/tests/test_types.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gitlab/tests/test_types.py b/gitlab/tests/test_types.py
index f84eddb..a2e5ff5 100644
--- a/gitlab/tests/test_types.py
+++ b/gitlab/tests/test_types.py
@@ -59,6 +59,11 @@ def test_list_attribute_get_for_api_from_list():
assert o.get_for_api() == "foo,bar,baz"
+def test_list_attribute_get_for_api_from_int_list():
+ o = types.ListAttribute([1, 9, 7])
+ assert o.get_for_api() == "1,9,7"
+
+
def test_list_attribute_does_not_split_string():
o = types.ListAttribute("foo")
assert o.get_for_api() == "foo"