From f45dab306114756b4ad4a81d409af27ce02e9dee Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 3 Feb 2008 01:37:29 +0000 Subject: [PATCH] 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 --- django/test/client.py | 4 ++-- 1 file 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()