web/test/unittest_application.py
branchstable
changeset 6797 90d687bd4c52
parent 6796 e70ca9abfc51
child 6848 f87cd875c6db
child 6875 a166b51d13f8
equal deleted inserted replaced
6796:e70ca9abfc51 6797:90d687bd4c52
   366 
   366 
   367     def _reset_cookie(self, req):
   367     def _reset_cookie(self, req):
   368         # preparing the suite of the test
   368         # preparing the suite of the test
   369         # set session id in cookie
   369         # set session id in cookie
   370         cookie = Cookie.SimpleCookie()
   370         cookie = Cookie.SimpleCookie()
   371         cookie['__session'] = req.session.sessionid
   371         sessioncookie = self.app.session_handler.session_cookie(req)
   372         req._headers['Cookie'] = cookie['__session'].OutputString()
   372         cookie[sessioncookie] = req.session.sessionid
       
   373         req._headers['Cookie'] = cookie[sessioncookie].OutputString()
   373         clear_cache(req, 'get_authorization')
   374         clear_cache(req, 'get_authorization')
   374         # reset session as if it was a new incoming request
   375         # reset session as if it was a new incoming request
   375         req.session = req.cnx = None
   376         req.session = req.cnx = None
   376 
   377 
   377     def _test_auth_anon(self, req):
   378     def _test_auth_anon(self, req):