diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2016-09-03 18:35:21 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2016-09-03 18:39:07 +0200 |
commit | c08c913b82bf7421600b248d055db497d627802a (patch) | |
tree | 4215bc66bc490970e39d1755b3b541876598f128 /tools/python_test.py | |
parent | 29e2efeae22ce5fa82e3541360b234e0053a65c2 (diff) | |
download | gitlab-c08c913b82bf7421600b248d055db497d627802a.tar.gz |
Fix and test pagination
Fixes #140
Diffstat (limited to 'tools/python_test.py')
-rw-r--r-- | tools/python_test.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/python_test.py b/tools/python_test.py index 9204862..f9f5bb8 100644 --- a/tools/python_test.py +++ b/tools/python_test.py @@ -136,6 +136,13 @@ assert(len(gl.projects.all()) == 4) assert(len(gl.projects.owned()) == 2) assert(len(gl.projects.search("admin")) == 1) +# test pagination +l1 = gl.projects.list(per_page=1, page=1) +l2 = gl.projects.list(per_page=1, page=2) +assert(len(l1) == 1) +assert(len(l2) == 1) +assert(l1[0].id != l2[0].id) + # project content (files) admin_project.files.create({'file_path': 'README', 'branch_name': 'master', |