#20237 closed Bug (fixed)
Unable to test pure binary with assertContains
Reported by: | Claude Paroz | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | 1.5 |
Severity: | Normal | Keywords: | regression |
Cc: | bmispelon@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In one of my projects, I'm testing some readable content of a PDF file with assertContains
. Unfortunately, this is no longer possible in Django 1.5 (and I'm probably partially accountable for that!), as assertContains
always try to decode the response content. I'd suggest to revert this regression.
Attachments (2)
Change History (8)
by , 12 years ago
Attachment: | 20237.diff added |
---|
comment:1 by , 12 years ago
Cc: | added |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 12 years ago
Resolution: | fixed |
---|---|
Status: | closed → new |
Unfortunately, there is still an issue when the assertContains
text parameter itself is made up of non-ascii binary content. I'll upload a complementary patch.
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
The patch looks good.
This does indeed appear to be a regression (the same test works fine in django 1.4).
I'm marking this as RFC.