Opened 11 years ago
Closed 11 years ago
#22572 closed Bug (fixed)
@override_settings(ROOT_URLCONF) doesn't clear urlresolvers._urlconfs.
Reported by: | loic84 | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | dev |
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
BaseHandler.get_response()
sets urlresolvers._urlconfs
through the set_urlconf()
function; this normally happens for every request.
The test client calls get_response()
, but since @override_settings(ROOT_URLCONF)
doesn't clear it, further reverse
outside of the test client may fail.
This only affects single tests with multiple override_settings
because SimpleTestCase
clears the urlconf between tests.
Change History (4)
comment:1 by , 11 years ago
Has patch: | set |
---|
comment:2 by , 11 years ago
I think the issue being raised is valid and the PR opened is good to go.
comment:3 by , 11 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
PR https://github.com/django/django/pull/2631.