summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-03-14 20:46:52 +0000
committerClaude Paroz <claude@2xlibre.net>2012-03-14 20:46:52 +0000
commit1235cd376e6bc8fd5c6cafe4bffeb6fa018e1476 (patch)
tree6e8a895862ff720783dd17bc97c7962a427fcba3
parent14df122f865e5c050a26c619f616d4983d6a4ed2 (diff)
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
-rw-r--r--django/contrib/auth/tests/context_processors.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/contrib/auth/tests/context_processors.py b/django/contrib/auth/tests/context_processors.py
index 8f77940a61..0eb5e5eb3c 100644
--- a/django/contrib/auth/tests/context_processors.py
+++ b/django/contrib/auth/tests/context_processors.py
@@ -29,6 +29,8 @@ class AuthContextProcessorTests(TestCase):
response = self.client.get('/auth_processor_no_attr_access/')
self.assertContains(response, "Session not accessed")
+ context._standard_context_processors = None
+
@override_settings(
MIDDLEWARE_CLASSES=global_settings.MIDDLEWARE_CLASSES,
TEMPLATE_CONTEXT_PROCESSORS=global_settings.TEMPLATE_CONTEXT_PROCESSORS,
@@ -43,6 +45,8 @@ class AuthContextProcessorTests(TestCase):
response = self.client.get('/auth_processor_attr_access/')
self.assertContains(response, "Session accessed")
+ context._standard_context_processors = None
+
def test_perms_attrs(self):
self.client.login(username='super', password='secret')
response = self.client.get('/auth_processor_perms/')