mirror of
https://github.com/django/django.git
synced 2025-06-06 20:19:13 +00:00
Reset template context processors cache after tests. Refs #17848.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
14df122f86
commit
1235cd376e
@ -29,6 +29,8 @@ class AuthContextProcessorTests(TestCase):
|
|||||||
response = self.client.get('/auth_processor_no_attr_access/')
|
response = self.client.get('/auth_processor_no_attr_access/')
|
||||||
self.assertContains(response, "Session not accessed")
|
self.assertContains(response, "Session not accessed")
|
||||||
|
|
||||||
|
context._standard_context_processors = None
|
||||||
|
|
||||||
@override_settings(
|
@override_settings(
|
||||||
MIDDLEWARE_CLASSES=global_settings.MIDDLEWARE_CLASSES,
|
MIDDLEWARE_CLASSES=global_settings.MIDDLEWARE_CLASSES,
|
||||||
TEMPLATE_CONTEXT_PROCESSORS=global_settings.TEMPLATE_CONTEXT_PROCESSORS,
|
TEMPLATE_CONTEXT_PROCESSORS=global_settings.TEMPLATE_CONTEXT_PROCESSORS,
|
||||||
@ -43,6 +45,8 @@ class AuthContextProcessorTests(TestCase):
|
|||||||
response = self.client.get('/auth_processor_attr_access/')
|
response = self.client.get('/auth_processor_attr_access/')
|
||||||
self.assertContains(response, "Session accessed")
|
self.assertContains(response, "Session accessed")
|
||||||
|
|
||||||
|
context._standard_context_processors = None
|
||||||
|
|
||||||
def test_perms_attrs(self):
|
def test_perms_attrs(self):
|
||||||
self.client.login(username='super', password='secret')
|
self.client.login(username='super', password='secret')
|
||||||
response = self.client.get('/auth_processor_perms/')
|
response = self.client.get('/auth_processor_perms/')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user