[testlib] fix rql generation bug w/ groups given as unicode string stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 07 Mar 2011 10:40:07 +0100
branchstable
changeset 7038 fe0afc4e8ebb
parent 7037 6a8235456fe1
child 7039 df0e8581b06f
[testlib] fix rql generation bug w/ groups given as unicode string
devtools/testlib.py
--- a/devtools/testlib.py	Thu Mar 03 17:50:13 2011 +0100
+++ b/devtools/testlib.py	Mon Mar 07 10:40:07 2011 +0100
@@ -1,4 +1,4 @@
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -356,7 +356,7 @@
         user = req.create_entity('CWUser', login=unicode(login),
                                  upassword=password, **kwargs)
         req.execute('SET X in_group G WHERE X eid %%(x)s, G name IN(%s)'
-                    % ','.join(repr(g) for g in groups),
+                    % ','.join(repr(str(g)) for g in groups),
                     {'x': user.eid})
         user.cw_clear_relation_cache('in_group', 'subject')
         if commit: