#34730: Add an assertMessages assertion
-----------------------------------+--------------------------------------
Reporter: François Freitag | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Comment (by François Freitag):
Thanks for your input!
Your suggestion addresses the two first pain points (retrieving messages
from a response, and storing in a `list` for assertions).
I see additional benefits with the suggested helper, because it is easier
to define the expected result (using tuples instead of
`django.contrib.messages.storage.base.Message` instances), and a failure
has a readable output. Without such helper, one would at best get
`'<django.contrib.messages.storage.base.Message object at some_address>'`
not being equal to `'<django.contrib.messages.storage.base.Message object
at another_address>'`.
--
Ticket URL: <https://code.djangoproject.com/ticket/34730#comment:4>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018987f50651-1d7f68c1-2a7d-402c-abe7-d6f816ddd497-000000%40eu-central-1.amazonses.com.