mirror of https://github.com/django/django.git
Fixed #12590. Changed an expression in the validators tests to work correctly with python 2.4. Thanks, ramiro.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12270 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
408d431029
commit
86f283d4ca
|
@ -119,7 +119,7 @@ TEST_DATA = (
|
||||||
)
|
)
|
||||||
|
|
||||||
def create_simple_test_method(validator, expected, value, num):
|
def create_simple_test_method(validator, expected, value, num):
|
||||||
if isinstance(expected, type) and issubclass(expected, Exception):
|
if expected is not None and issubclass(expected, Exception):
|
||||||
test_mask = 'test_%s_raises_error_%d'
|
test_mask = 'test_%s_raises_error_%d'
|
||||||
def test_func(self):
|
def test_func(self):
|
||||||
self.assertRaises(expected, validator, value)
|
self.assertRaises(expected, validator, value)
|
||||||
|
|
Loading…
Reference in New Issue