Kaydet (Commit) 41a78769 authored tarafından Mads Jensen's avatar Mads Jensen Kaydeden (comit) Tim Graham

Added test for too large input to django.utils.http.base36_to_int().

üst 4fe6588d
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment