Ticket #6479: 0004-Replace-hardcoded-cookie-session-name.patch

File 0004-Replace-hardcoded-cookie-session-name.patch, 887 bytes (added by Bastian Kleineidam <calvin@…>, 17 years ago)
  • django/test/client.py

    From c014ebdc500180e6bc7ae7a5e59fe78f5bcc3455 Mon Sep 17 00:00:00 2001
    From: Bastian Kleineidam <calvin@debian.org>
    Date: Fri, 25 Jan 2008 14:59:57 +0100
    Subject: Replace hardcoded cookie session name
    
    Replace the hardcoded cookie session name "sessionid" with
    settings.SESSION_COOKIE_NAME.
    
    Signed-off-by: Bastian Kleineidam <calvin@debian.org>
    
    diff --git a/django/test/client.py b/django/test/client.py
    index bbd8239..5460527 100644
    a b class Client:  
    274274        Causes the authenticated user to be logged out.
    275275        """
    276276        session = __import__(settings.SESSION_ENGINE, {}, {}, ['']).SessionStore()
    277         session.delete(session_key=self.cookies['sessionid'].value)
     277        session.delete(session_key=self.cookies[settings.SESSION_COOKIE_NAME].value)
    278278        self.cookies = SimpleCookie()
Back to Top