summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2012-03-15 02:46:07 +0000
committerRamiro Morales <cramm0@gmail.com>2012-03-15 02:46:07 +0000
commita935e834433cfc691882c2bbf1249a39abecd35b (patch)
tree92e43719c4f278ddee4755793dfbde9928095478 /django
parenta673ec80e21447b9833c744293cd5c60bfcce2ff (diff)
Reverted r16386 because it replaced a brittle method with another not less
arbitrary method when the test client checks for the presence of the bundled session backends+session middleware combination. We will revisit the issue soon, probably to make these checks even less strict. Refs #7836, #16605 git-svn-id: http://code.djangoproject.com/svn/django/trunk@17739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/test/client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/test/client.py b/django/test/client.py
index 94fabcf91a..6f3b73dde3 100644
--- a/django/test/client.py
+++ b/django/test/client.py
@@ -350,7 +350,7 @@ class Client(RequestFactory):
"""
Obtains the current session variables.
"""
- if 'django.contrib.sessions.middleware.SessionMiddleware' in settings.MIDDLEWARE_CLASSES:
+ if 'django.contrib.sessions' in settings.INSTALLED_APPS:
engine = import_module(settings.SESSION_ENGINE)
cookie = self.cookies.get(settings.SESSION_COOKIE_NAME, None)
if cookie:
@@ -498,7 +498,7 @@ class Client(RequestFactory):
"""
user = authenticate(**credentials)
if user and user.is_active \
- and 'django.contrib.sessions.middleware.SessionMiddleware' in settings.MIDDLEWARE_CLASSES:
+ and 'django.contrib.sessions' in settings.INSTALLED_APPS:
engine = import_module(settings.SESSION_ENGINE)
# Create a fake request to store login details.