diff --git a/django/contrib/auth/tests/context_processors.py b/django/contrib/auth/tests/context_processors.py
index 8f77940..59301b6 100644
a
|
b
|
class AuthContextProcessorTests(TestCase):
|
24 | 24 | Tests that the session is not accessed simply by including |
25 | 25 | the auth context processor |
26 | 26 | """ |
| 27 | _saved_standard_context_processors = context._standard_context_processors |
27 | 28 | context._standard_context_processors = None |
28 | 29 | |
29 | 30 | response = self.client.get('/auth_processor_no_attr_access/') |
30 | 31 | self.assertContains(response, "Session not accessed") |
31 | 32 | |
| 33 | context._standard_context_processors = _saved_standard_context_processors |
| 34 | |
32 | 35 | @override_settings( |
33 | 36 | MIDDLEWARE_CLASSES=global_settings.MIDDLEWARE_CLASSES, |
34 | 37 | TEMPLATE_CONTEXT_PROCESSORS=global_settings.TEMPLATE_CONTEXT_PROCESSORS, |
… |
… |
class AuthContextProcessorTests(TestCase):
|
38 | 41 | Tests that the session is accessed if the auth context processor |
39 | 42 | is used and relevant attributes accessed. |
40 | 43 | """ |
| 44 | _saved_standard_context_processors = context._standard_context_processors |
41 | 45 | context._standard_context_processors = None |
42 | 46 | |
43 | 47 | response = self.client.get('/auth_processor_attr_access/') |
44 | 48 | self.assertContains(response, "Session accessed") |
45 | 49 | |
| 50 | context._standard_context_processors = _saved_standard_context_processors |
| 51 | |
46 | 52 | def test_perms_attrs(self): |
47 | 53 | self.client.login(username='super', password='secret') |
48 | 54 | response = self.client.get('/auth_processor_perms/') |