Skip to content

Commit

Permalink
Reset template context processors cache after tests. Refs #17848.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
claudep committed Mar 14, 2012
1 parent 14df122 commit 1235cd3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions django/contrib/auth/tests/context_processors.py
Expand Up @@ -29,6 +29,8 @@ def test_session_not_accessed(self):
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,
Expand All @@ -43,6 +45,8 @@ def test_session_is_accessed(self):
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/')
Expand Down

0 comments on commit 1235cd3

Please sign in to comment.