[web test] fix authentication test: session cookie should now be computed by the session handler (changed in cw 3.10.6) stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 10 Jan 2011 12:28:10 +0100
branchstable
changeset 6797 90d687bd4c52
parent 6796 e70ca9abfc51
child 6798 c3d5c0a215b7
[web test] fix authentication test: session cookie should now be computed by the session handler (changed in cw 3.10.6)
web/test/unittest_application.py
--- a/web/test/unittest_application.py	Mon Jan 10 12:28:09 2011 +0100
+++ b/web/test/unittest_application.py	Mon Jan 10 12:28:10 2011 +0100
@@ -368,8 +368,9 @@
         # preparing the suite of the test
         # set session id in cookie
         cookie = Cookie.SimpleCookie()
-        cookie['__session'] = req.session.sessionid
-        req._headers['Cookie'] = cookie['__session'].OutputString()
+        sessioncookie = self.app.session_handler.session_cookie(req)
+        cookie[sessioncookie] = req.session.sessionid
+        req._headers['Cookie'] = cookie[sessioncookie].OutputString()
         clear_cache(req, 'get_authorization')
         # reset session as if it was a new incoming request
         req.session = req.cnx = None