summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-02-03 01:37:29 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-02-03 01:37:29 +0000
commitf45dab306114756b4ad4a81d409af27ce02e9dee (patch)
tree13efc2b6b7e648a034092253983c67cac3f2379c
parent046d943148e82c4f2a9a164b6bfceb8c7dda2608 (diff)
Fixed #6479 -- Use settings.SESSION_COOKIE_NAME instead of hard-coded "sessionid" in the test client. Thanks, Bastian Kleineidam.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7058 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-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 bbd8239c33..b02d298418 100644
--- a/django/test/client.py
+++ b/django/test/client.py
@@ -262,7 +262,7 @@ class Client:
self.cookies[settings.SESSION_COOKIE_NAME]['expires'] = None
# Save the session values
- request.session.save()
+ request.session.save()
return True
else:
@@ -274,5 +274,5 @@ class Client:
Causes the authenticated user to be logged out.
"""
session = __import__(settings.SESSION_ENGINE, {}, {}, ['']).SessionStore()
- session.delete(session_key=self.cookies['sessionid'].value)
+ session.delete(session_key=self.cookies[settings.SESSION_COOKIE_NAME].value)
self.cookies = SimpleCookie()