Refs #33348 -- Improved messages raised by SimpleTestCase.assertFormError()/assertFormsetErrors().

This makes messages use BaseFormSet/BaseForm.__repr__() instead of
context, and adds the _assert_form_error() helper.
This commit is contained in:
Baptiste Mispelon 2022-02-14 11:02:33 +01:00 committed by Mariusz Felisiak
parent 9bb13def5d
commit d84cd91e90
4 changed files with 130 additions and 212 deletions

View file

@ -83,6 +83,10 @@ class AdminForm:
def non_field_errors(self):
return self.form.non_field_errors
@property
def fields(self):
return self.form.fields
@property
def is_bound(self):
return self.form.is_bound