Opened 11 years ago
Closed 11 years ago
#20918 closed Cleanup/optimization (fixed)
Tidy up implementation of custom assertions
Reported by: | Marc Tamlyn | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The custom assertions provided by Django have a significant amount of duplication between the true and false cases - e.g. between assertContains
and assertNotContains
. There appear to be subtle difference and it concerns me that perhaps some of these are bugfixes which have only been applied to one of the methods.
For example, assertNotContains
seems to not handle streaming responses.
Change History (3)
comment:1 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 11 years ago
comment:3 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I've written an initial patch https://github.com/django/django/pull/1507 . I'm not really sure if this is the way to go forward. If it is, then I'll move forward with other functions that has the same problem.