1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Completed test coverage for django.core.paginator.

This commit is contained in:
Marcelo Galigniana 2022-10-12 00:54:57 -03:00 committed by Mariusz Felisiak
parent 9101adc8ba
commit 2a2503c2c1

View File

@ -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)