Ticket #17691: middleware.patch

File middleware.patch, 896 bytes (added by gugu, 13 years ago)
  • django/contrib/auth/tests/context_processors.py

     
    44from django.contrib.auth import authenticate
    55from django.db.models import Q
    66from django.test import TestCase
     7from django.test.utils import override_settings
    78
    89
    910class AuthContextProcessorTests(TestCase):
     
    2223    def tearDown(self):
    2324        settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
    2425
     26    @override_settings(MIDDLEWARE_CLASSES=(
     27        'django.contrib.sessions.middleware.SessionMiddleware',
     28        'django.contrib.auth.middleware.AuthenticationMiddleware',
     29    ))
    2530    def test_session_not_accessed(self):
    2631        """
    2732        Tests that the session is not accessed simply by including
Back to Top