summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMoayad Mardini <moayad.m@gmail.com>2014-07-25 11:04:58 +0300
committerTim Graham <timograham@gmail.com>2014-07-25 06:16:55 -0400
commitce95ab8f025cc9f35990f0c2d9a290eec1ece753 (patch)
tree046c462ee5ac23016a1d1653837c9e5f4bb6e048 /tests
parent0ac986fd8cb2561a22aa3291672723b50397e5ac (diff)
[1.7.x] Fixed #23088 -- Used `six` `range` type in `Paginator.page_range`.
Backport of 6508db2ff9 from master
Diffstat (limited to 'tests')
-rw-r--r--tests/pagination/tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/pagination/tests.py b/tests/pagination/tests.py
index c2ad54c5ad..3ff1306045 100644
--- a/tests/pagination/tests.py
+++ b/tests/pagination/tests.py
@@ -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):
"""