# HG changeset patch # User Pierre-Yves David # Date 1372091722 -7200 # Node ID b1cad8e4557fac6f00a6d934cc01b73ca5587b10 # Parent 2e64254548cabb5b2c1e478e06d97214ac04ba06 [web/test] properly reset the request connection related attribute A new request does not have those attribute to None. There have special value that we now properly reinstall. diff -r 2e64254548ca -r b1cad8e4557f web/test/unittest_application.py --- a/web/test/unittest_application.py Mon Jun 24 18:23:48 2013 +0200 +++ b/web/test/unittest_application.py Mon Jun 24 18:35:22 2013 +0200 @@ -30,6 +30,7 @@ from cubicweb.web import LogOut, Redirect, INTERNAL_FIELD_VALUE from cubicweb.web.views.basecontrollers import ViewController from cubicweb.web.application import anonymized_request +from cubicweb.dbapi import DBAPISession, _NeedAuthAccessMock class FakeMapping: """emulates a mapping module""" @@ -366,7 +367,9 @@ raw=True) clear_cache(req, 'get_authorization') # reset session as if it was a new incoming request - req.session = req.cnx = None + req.session = DBAPISession(None) + req.user = req.cnx = _NeedAuthAccessMock + def _test_auth_anon(self, req): asession = self.app.get_session(req)