diff -r 77ea3eed9946 -r 0d2fb4604265 devtools/testlib.py --- a/devtools/testlib.py Thu Sep 20 14:50:06 2012 +0200 +++ b/devtools/testlib.py Fri Sep 14 14:15:39 2012 +0200 @@ -47,7 +47,7 @@ from cubicweb import cwconfig, dbapi, devtools, web, server from cubicweb.sobjects import notification from cubicweb.web import Redirect, application -from cubicweb.server.session import Session, security_enabled +from cubicweb.server.session import Session from cubicweb.server.hook import SendMailOp from cubicweb.devtools import SYSTEM_ENTITIES, SYSTEM_RELATIONS, VIEW_VALIDATORS from cubicweb.devtools import BASE_URL, fake, htmlparser, DEFAULT_EMPTY_DB_ID @@ -1050,7 +1050,7 @@ """this method populates the database with `how_many` entities of each possible type. It also inserts random relations between them """ - with security_enabled(self.session, read=False, write=False): + with self.session.security_enabled(read=False, write=False): self._auto_populate(how_many) def _auto_populate(self, how_many):