#29758 closed Cleanup/optimization (fixed)
Document testing custom error handlers
Reported by: | Adam Johnson | Owned by: | cammil |
---|---|---|---|
Component: | Documentation | Version: | 2.1 |
Severity: | Normal | Keywords: | |
Cc: | 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
As discussed in #29642, testing custom error handlers is trickier than it appears at first sight - to accurately simulate their arguments, it's best to actually raise the triggering exceptions, as Django's own test suite does: https://github.com/django/django/blob/master/tests/handlers/tests_custom_error_handlers.py#L23
This could be documented to help users setting out to customize the errors Django returns
Change History (6)
comment:1 by , 6 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 6 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
Yes. I've been down this road. Having this documented would be helpful I think.