diff --git a/tests/regressiontests/utils/baseconv.py b/tests/regressiontests/utils/baseconv.py index 75660d8119..cc413b4e8e 100644 --- a/tests/regressiontests/utils/baseconv.py +++ b/tests/regressiontests/utils/baseconv.py @@ -1,10 +1,11 @@ from unittest import TestCase from django.utils.baseconv import base2, base16, base36, base56, base62, base64, BaseConverter +from django.utils.six.moves import xrange class TestBaseConv(TestCase): def test_baseconv(self): - nums = [-10 ** 10, 10 ** 10] + range(-100, 100) + nums = [-10 ** 10, 10 ** 10] + list(xrange(-100, 100)) for converter in [base2, base16, base36, base56, base62, base64]: for i in nums: self.assertEqual(i, converter.decode(converter.encode(i)))