mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #23088 -- Used six
range
type in Paginator.page_range
.
This commit is contained in:
parent
bb395a15ba
commit
6508db2ff9
2 changed files with 8 additions and 1 deletions
|
@ -232,6 +232,13 @@ class PaginationTests(unittest.TestCase):
|
|||
self.assertEqual(page2.previous_page_number(), 1)
|
||||
self.assertIsNone(page2.next_page_number())
|
||||
|
||||
def test_page_range_type(self):
|
||||
"""
|
||||
Ticket #23088: Paginator.page_range is of inconsistent type in Py2/Py3
|
||||
"""
|
||||
paginator = Paginator([1, 2, 3], 2)
|
||||
self.assertEqual(type(paginator.page_range), six.moves.range)
|
||||
|
||||
|
||||
class ModelPaginationTests(TestCase):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue