Code

Ticket #12590: 12590.diff

File 12590.diff, 570 bytes (added by ramiro, 5 years ago)

One way to fix this issue.

Line 
1diff -r 23998935fb01 tests/modeltests/validators/tests.py
2--- a/tests/modeltests/validators/tests.py      Tue Jan 12 11:58:47 2010 -0300
3+++ b/tests/modeltests/validators/tests.py      Tue Jan 12 14:05:52 2010 -0300
4@@ -119,7 +119,7 @@
5 )
6 
7 def create_simple_test_method(validator, expected, value, num):
8-    if isinstance(expected, type) and issubclass(expected, Exception):
9+    if expected is not None and issubclass(expected, Exception):
10         test_mask = 'test_%s_raises_error_%d'
11         def test_func(self):
12             self.assertRaises(expected, validator, value)