Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit f45dab306114756b4ad4a81d409af27ce02e9dee 1 parent 046d943
@malcolmt malcolmt authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/test/client.py
View
4 django/test/client.py
@@ -262,7 +262,7 @@ def login(self, **credentials):
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 @@ def logout(self):
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()
Please sign in to comment.
Something went wrong with that request. Please try again.