summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2011-04-22 12:03:03 +0000
committerJannis Leidel <jannis@leidel.info>2011-04-22 12:03:03 +0000
commit0e9692bc66ed7cfbbcb4c8031b36e82751685238 (patch)
tree4e2b52e40f3d3ead84857facdb2a78187e86a184 /tests
parente744fec8f9c47c8d45045d36df202deb4b6c3b9f (diff)
Fixed #13689 -- Convert the per_page value to an integer upon initialization of the Paginator class to prevent unpleasant TypeErrors. Thanks, rbanffy, Eric Florenzano and Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16073 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/pagination_regress/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/regressiontests/pagination_regress/tests.py b/tests/regressiontests/pagination_regress/tests.py
index 3feeae9083..9f381a5981 100644
--- a/tests/regressiontests/pagination_regress/tests.py
+++ b/tests/regressiontests/pagination_regress/tests.py
@@ -94,6 +94,11 @@ class PaginatorTests(TestCase):
(([1, 2], 1, 1, True), (2, 1, [1])),
(([1, 2, 3], 2, 1, True), (3, 1, [1])),
((eleven, 10, 1, True), (11, 1, [1])),
+ # Non-integer inputs
+ ((ten, '4', 1, False), (10, 3, [1, 2, 3])),
+ ((ten, u'4', 1, False), (10, 3, [1, 2, 3])),
+ ((ten, 4, '1', False), (10, 3, [1, 2, 3])),
+ ((ten, 4, u'1', False), (10, 3, [1, 2, 3])),
)
for params, output in tests:
self.check_paginator(params, output)