#24782: Add TestCase.assertFormValid
---------------------------------------------+------------------------
Reporter: mjtamlyn | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: master
Severity: Normal | Keywords: forms
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
---------------------------------------------+------------------------
In the case the form is actually valid, then `assertFormValid(form)` is no
different to `assertTrue(form.is_valid)`, however when the assertion fails
it should print some helpful output about which fields have validation
errors and what those errors are. Even just outputting `errors.as_json`
would help a lot. I've implemented code along the lines of this many
times.
--
Ticket URL: <https://code.djangoproject.com/ticket/24782>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.094ebc88bd73728e52376a3274586759%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.