Opened 13 years ago
Closed 13 years ago
#17848 closed Bug (fixed)
Template context processors cache needs to be restored after it is cleared
Reported by: | Ryan Kaskel | Owned by: | ryan |
---|---|---|---|
Component: | contrib.auth | Version: | 1.4-beta-1 |
Severity: | Normal | Keywords: | tests |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
I contributed the portion of the patch for #16366 where context._standard_context_processors
is set to
None`.
Unfortunatley, I neglected to restore the cache as it was at the end of the test.
The effect of this is that cache is now wrong for the rest of my project (and will be for others) and other tests fail.
This patch fixes this.
Attachments (4)
Change History (13)
by , 13 years ago
Attachment: | 17848.diff added |
---|
comment:1 by , 13 years ago
comment:3 by , 13 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
Just ran tests and they pass - this looks like a sane approach
comment:4 by , 13 years ago
Triage Stage: | Ready for checkin → Accepted |
---|
I'd just like some other committer to judge if the signal_setting approach might be a little cleaner. I also changed TEMPLATE_CONTEXT_PROCESSORS overriding in other tests to be consistent.
comment:5 by , 13 years ago
I'm not comfortable with large changes this close to 1.4 final. I think we could commit the first version now, and implement the signal_setting
-based technique after 1.4.
comment:7 by , 13 years ago
Severity: | Release blocker → Normal |
---|
Severity back to normal. Patch using setting_changed signal will be applied later.
comment:8 by , 13 years ago
Note that currenlty, the test messages.SessionTest.test_middleware_disabled_fail_silently does not pass when it is run individually, which is a symptom of the context processors cache issue (fixed in the latest patch).
I think it would be easier to just empty the cache again at the end of the tests.