--- a/cubicweb/devtools/testlib.py Fri Mar 10 12:07:29 2017 +0100
+++ b/cubicweb/devtools/testlib.py Fri Mar 10 18:24:40 2017 +0100
@@ -223,11 +223,6 @@
.. automethod:: cubicweb.testlib.RepoAccess.cnx
.. automethod:: cubicweb.testlib.RepoAccess.web_request
-
- The RepoAccess need to be closed to destroy the associated Session.
- TestCase usually take care of this aspect for the user.
-
- .. automethod:: cubicweb.testlib.RepoAccess.close
"""
def __init__(self, repo, login, requestcls):
@@ -279,10 +274,6 @@
req.set_cnx(cnx)
yield req
- def close(self):
- """Close the session associated to the RepoAccess"""
- self._session.close()
-
@contextmanager
def shell(self):
from cubicweb.server.migractions import ServerMigrationHelper
@@ -360,7 +351,7 @@
def _close_access(self):
while self._open_access:
try:
- self._open_access.pop().close()
+ self._open_access.pop()
except BadConnectionId:
continue # already closed
@@ -458,7 +449,6 @@
def tearDown(self):
# XXX hack until logilab.common.testlib is fixed
if self._admin_session is not None:
- self._admin_session.close()
self._admin_session = None
while self._cleanups:
cleanup, args, kwargs = self._cleanups.pop(-1)