# HG changeset patch # User Julien Cristau # Date 1443693722 -7200 # Node ID 03aa9f2a4ecb77549d18bee7d5eac51369f5b7dd # Parent c90e7bf2dd552b972c6795721cde6f9d29bd87d7 [ext/test] fix test relying on repr(text) diff -r c90e7bf2dd55 -r 03aa9f2a4ecb ext/test/unittest_rest.py --- a/ext/test/unittest_rest.py Thu Oct 01 12:01:28 2015 +0200 +++ b/ext/test/unittest_rest.py Thu Oct 01 12:02:02 2015 +0200 @@ -15,6 +15,8 @@ # # You should have received a copy of the GNU Lesser General Public License along # with CubicWeb. If not, see . +from six import PY3 + from logilab.common.testlib import unittest_main from cubicweb.devtools.testlib import CubicWebTC @@ -79,7 +81,9 @@ context = self.context(req) out = rest_publish(context, ':rql:`Any X WHERE X is CWUser:toto`') self.assertTrue(out.startswith("

an error occurred while interpreting this " - "rql directive: ObjectNotFound(u'toto',)

")) + "rql directive: ObjectNotFound(%s'toto',)

" % + ('' if PY3 else 'u')), + out) def test_rql_role_without_vid(self): with self.admin_access.web_request() as req: