Skip to content

Commit 93d3263

Browse files
committed
pagination performance mongoengine tester
1 parent 1159080 commit 93d3263

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_pagination.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ def test_queryset_paginator(app, todo):
1818
paginator = Pagination(Todo.objects, 1, 10)
1919
_test_paginator(paginator)
2020

21+
for page in range(1, 10):
22+
for index, todo in enumerate(
23+
Todo.objects.paginate(page=page, per_page=5).items
24+
):
25+
assert todo.title == f"post: {(page-1) * 5 + index}"
26+
2127

2228
def test_paginate_plain_list():
2329
with pytest.raises(NotFound):

0 commit comments

Comments
 (0)