# HG changeset patch # User Denis Laxalde # Date 1552042565 -3600 # Node ID 3ad34ceee0c4f0902398fb288f4157ad620c9728 # Parent 76f7753e81a2af0ff4adc3cbd7b0deae34ac0b80 [test] Shorten prefix string in test_rql_role_with_unknown_vid With Python3.7, this test fails as the error message returned by rest_publish() is:

an error occurred while interpreting this rql directive: ObjectNotFound('toto')

while we previously assumed a comma after 'toto'. Fixing this by only shortening the prefix used in out.startswith(). diff -r 76f7753e81a2 -r 3ad34ceee0c4 cubicweb/ext/test/unittest_rest.py --- a/cubicweb/ext/test/unittest_rest.py Fri Mar 08 11:52:31 2019 +0100 +++ b/cubicweb/ext/test/unittest_rest.py Fri Mar 08 11:56:05 2019 +0100 @@ -89,7 +89,7 @@ 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(%s'toto',)

" % + "rql directive: ObjectNotFound(%s'toto'" % ('' if PY3 else 'u')), out)