Ticket #12590: 12590.diff

File 12590.diff, 570 bytes (added by Ramiro Morales, 8 years ago)

One way to fix this issue.

  • tests/modeltests/validators/tests.py

    diff -r 23998935fb01 tests/modeltests/validators/tests.py
    a b  
    121121def create_simple_test_method(validator, expected, value, num):
    122     if isinstance(expected, type) and issubclass(expected, Exception):
     122    if expected is not None and issubclass(expected, Exception):
    123123        test_mask = 'test_%s_raises_error_%d'
    124124        def test_func(self):
    125125            self.assertRaises(expected, validator, value)
Back to Top