Ticket #17499: assertfieldoutput.patch
File assertfieldoutput.patch, 1.0 KB (added by , 13 years ago) |
---|
-
django/test/testcases.py
31 31 from django.test.utils import (get_warnings_state, restore_warnings_state, 32 32 override_settings) 33 33 from django.utils import simplejson, unittest as ut2 34 from django.utils.encoding import smart_str 34 from django.utils.encoding import smart_str, force_unicode 35 35 from django.views.static import serve 36 36 37 37 __all__ = ('DocTestRunner', 'OutputChecker', 'TestCase', 'TransactionTestCase', … … 335 335 optional.clean(input) 336 336 self.assertEqual(context_manager.exception.messages, errors) 337 337 # test required inputs 338 error_required = [ u'This field is required.']338 error_required = [force_unicode(required.error_messages['required'])] 339 339 for e in EMPTY_VALUES: 340 340 with self.assertRaises(ValidationError) as context_manager: 341 341 required.clean(e)