Ticket #11241: assertFormError.diff
File assertFormError.diff, 857 bytes (added by , 15 years ago) |
---|
-
django/test/testcases.py
395 395 " contain the field '%s'" % 396 396 (form, i, field)) 397 397 else: 398 non_field_errors = context[form].non_field_errors() 398 try: 399 non_field_errors = context[form].non_form_errors() 400 except Exception, e: 401 non_field_errors = context[form].non_field_errors() 399 402 self.failUnless(err in non_field_errors, 400 403 "The form '%s' in context %d does not contain the" 401 404 " non-field error '%s' (actual errors: %s)" %