[test] Shorten prefix string in test_rql_role_with_unknown_vid 3.26
authorDenis Laxalde <denis.laxalde@logilab.fr>
Fri, 08 Mar 2019 11:56:05 +0100
branch3.26
changeset 12488 3ad34ceee0c4
parent 12487 76f7753e81a2
child 12489 79fce4bde06f
[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: <p>an error occurred while interpreting this rql directive: ObjectNotFound('toto')</p> while we previously assumed a comma after 'toto'. Fixing this by only shortening the prefix used in out.startswith().
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("<p>an error occurred while interpreting this "
-                                           "rql directive: ObjectNotFound(%s'toto',)</p>" %
+                                           "rql directive: ObjectNotFound(%s'toto'" %
                                            ('' if PY3 else 'u')),
                             out)