Opened 8 years ago
Closed 7 years ago
#20918 closed Cleanup/optimization (fixed)
Tidy up implementation of custom assertions
Reported by: | Marc Tamlyn | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | master |
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 Changed 8 years ago by
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 Changed 8 years ago by
comment:3 Changed 7 years ago by
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.