From c08c913b82bf7421600b248d055db497d627802a Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Sat, 3 Sep 2016 18:35:21 +0200 Subject: Fix and test pagination Fixes #140 --- tools/python_test.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/python_test.py') 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', -- cgit v1.2.1