From 41a78769915c539b4aa464f0157ad52a0ee25e7f Mon Sep 17 00:00:00 2001 From: Mads Jensen Date: Thu, 21 Sep 2017 16:21:02 +0200 Subject: [PATCH] Added test for too large input to django.utils.http.base36_to_int(). --- tests/utils_tests/test_http.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/utils_tests/test_http.py b/tests/utils_tests/test_http.py index e3b9425184..5ce91c3728 100644 --- a/tests/utils_tests/test_http.py +++ b/tests/utils_tests/test_http.py @@ -61,6 +61,9 @@ class TestUtilsHttp(unittest.TestCase): for n in ['#', ' ']: with self.assertRaises(ValueError): http.base36_to_int(n) + with self.assertRaises(ValueError) as cm: + http.base36_to_int('1' * 14) + self.assertEqual('Base36 input too large', str(cm.exception)) for n in [123, {1: 2}, (1, 2, 3), 3.141]: with self.assertRaises(TypeError): http.base36_to_int(n)