diff options
Diffstat (limited to 'gitlab/tests/test_gitlab.py')
-rw-r--r-- | gitlab/tests/test_gitlab.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py index f9d4cc8..7449b3a 100644 --- a/gitlab/tests/test_gitlab.py +++ b/gitlab/tests/test_gitlab.py @@ -119,6 +119,24 @@ class TestGitlabList(unittest.TestCase): self.assertEqual(l[0]["a"], "b") self.assertEqual(l[1]["c"], "d") + def test_all_omitted_when_as_list(self): + @urlmatch(scheme="http", netloc="localhost", path="/api/v4/tests", method="get") + def resp(url, request): + headers = { + "content-type": "application/json", + "X-Page": 2, + "X-Next-Page": 2, + "X-Per-Page": 1, + "X-Total-Pages": 2, + "X-Total": 2, + } + content = '[{"c": "d"}]' + return response(200, content, headers, None, 5, request) + + with HTTMock(resp): + result = self.gl.http_list("/tests", as_list=False, all=True) + self.assertIsInstance(result, GitlabList) + class TestGitlabHttpMethods(unittest.TestCase): def setUp(self): |