#36859: SimpleTestCase.assertContains can't be called multiple times on a
streaming
response
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Baptiste
| Mispelon
Type: New feature | Status: assigned
Component: Testing framework | Version: 6.0
Severity: Normal | Resolution:
Keywords: assertContains, | Triage Stage: Accepted
streaming |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Baptiste Mispelon):
On the bug vs. feature, I'd argue for the latter on the basis that the
current behaviour was neither tested nor documented.
I'll also note that `assertContains()` already handles streaming responses
differently than non-streaming ones:
https://github.com/django/django/blob/07a16407452f5b62594661ae7ae589eca8cccd4d/django/test/testcases.py#L575
I've added release notes to my PR.
--
Ticket URL: <https://code.djangoproject.com/ticket/36859#comment:6>
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 visit
https://groups.google.com/d/msgid/django-updates/0107019bc262790f-b18c53ee-1251-47d7-a790-8d6eb3935c8b-000000%40eu-central-1.amazonses.com.