diff options
| author | Mads Jensen <mje@inducks.org> | 2017-09-21 16:21:02 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-09-21 10:21:02 -0400 |
| commit | 41a78769915c539b4aa464f0157ad52a0ee25e7f (patch) | |
| tree | ad2ce10898153e153f691130d5512da1eb8db969 /tests/utils_tests/test_http.py | |
| parent | 4fe6588da372cdcc14f3e981d4bb960cf905dc74 (diff) | |
Added test for too large input to django.utils.http.base36_to_int().
Diffstat (limited to 'tests/utils_tests/test_http.py')
| -rw-r--r-- | tests/utils_tests/test_http.py | 3 |
1 files changed, 3 insertions, 0 deletions
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) |
