Ticket #17499: assertfieldoutput.patch

File assertfieldoutput.patch, 1.0 KB (added by dpifke, 13 years ago)

Proposed patch against trunk

  • django/test/testcases.py

     
    3131from django.test.utils import (get_warnings_state, restore_warnings_state,
    3232    override_settings)
    3333from django.utils import simplejson, unittest as ut2
    34 from django.utils.encoding import smart_str
     34from django.utils.encoding import smart_str, force_unicode
    3535from django.views.static import serve
    3636
    3737__all__ = ('DocTestRunner', 'OutputChecker', 'TestCase', 'TransactionTestCase',
     
    335335                optional.clean(input)
    336336            self.assertEqual(context_manager.exception.messages, errors)
    337337        # test required inputs
    338         error_required = [u'This field is required.']
     338        error_required = [force_unicode(required.error_messages['required'])]
    339339        for e in EMPTY_VALUES:
    340340            with self.assertRaises(ValidationError) as context_manager:
    341341                required.clean(e)
Back to Top