# HG changeset patch # User Pierre-Yves David # Date 1372328897 -7200 # Node ID 9a9d3f4bad310c6b7b341fb33c2b0c8a5f9884d2 # Parent af6efc15fc9022d6d2a74ac634b223e682eb7bb6 [testlib] use internal_cnx instead of internal_session internal_session is deprecated. diff -r af6efc15fc90 -r 9a9d3f4bad31 devtools/testlib.py --- a/devtools/testlib.py Thu Jun 27 14:12:00 2013 +0200 +++ b/devtools/testlib.py Thu Jun 27 12:28:17 2013 +0200 @@ -281,8 +281,8 @@ # get an admin session (without actual login) sources = db_handler.config.sources() login = unicode(sources['admin']['login']) - with self.repo.internal_session() as session: - rset = session.execute('CWUser U WHERE U login %(u)s', {'u': login}) + with self.repo.internal_cnx() as cnx: + rset = cnx.execute('CWUser U WHERE U login %(u)s', {'u': login}) user = rset.get_entity(0, 0) user.groups user.properties