--- a/devtools/testlib.py Fri May 06 11:44:40 2011 +0200
+++ b/devtools/testlib.py Sat May 07 10:51:47 2011 +0200
@@ -360,7 +360,7 @@
"""create and return a new user entity"""
if isinstance(req, basestring):
warn('[3.12] create_user arguments are now (req, login[, groups, password, commit, **kwargs])',
- DeprecationWarning, stacklevel=1)
+ DeprecationWarning, stacklevel=2)
if not isinstance(groups, (tuple, list)):
password = groups
groups = login
@@ -391,7 +391,7 @@
"""
if not isinstance(session, Session):
warn('[3.12] grant_permission arguments are now (session, entity, group, pname[, plabel])',
- DeprecationWarning, stacklevel=1)
+ DeprecationWarning, stacklevel=2)
plabel = pname
pname = group
group = entity
@@ -400,7 +400,7 @@
session = self.session
pname = unicode(pname)
plabel = plabel and unicode(plabel) or unicode(group)
- e = entity.eid
+ e = getattr(entity, 'eid', entity)
with security_enabled(session, False, False):
peid = session.execute(
'INSERT CWPermission X: X name %(pname)s, X label %(plabel)s,'