summaryrefslogtreecommitdiff
path: root/tests/pagination
diff options
context:
space:
mode:
authorMarcelo Galigniana <marcelogaligniana@gmail.com>2022-10-12 00:54:57 -0300
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-10-13 12:27:41 +0200
commit2a2503c2c1b42fbeb19a7918c4ec06cb420e0000 (patch)
treef4654825baa00ee1f2ceb45b7fdeabcecd13c63b /tests/pagination
parent9101adc8ba66556c98f3955138d72b3492a6a60c (diff)
downloaddjango-2a2503c2c1b42fbeb19a7918c4ec06cb420e0000.tar.gz
Completed test coverage for django.core.paginator.
Diffstat (limited to 'tests/pagination')
-rw-r--r--tests/pagination/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/pagination/tests.py b/tests/pagination/tests.py
index 8444bd3dd0..a04b6dfe8a 100644
--- a/tests/pagination/tests.py
+++ b/tests/pagination/tests.py
@@ -320,6 +320,11 @@ class PaginationTests(SimpleTestCase):
with self.subTest(page=page):
self.assertEqual(expected, list(next(page_iterator)))
+ self.assertEqual(
+ [str(page) for page in iter(paginator)],
+ ["<Page 1 of 2>", "<Page 2 of 2>"],
+ )
+
def test_get_elided_page_range(self):
# Paginator.validate_number() must be called:
paginator = Paginator([1, 2, 3], 2)