--- a/ext/test/unittest_rest.py Wed Aug 03 18:16:02 2011 +0200
+++ b/ext/test/unittest_rest.py Thu Aug 04 12:11:36 2011 +0200
@@ -63,6 +63,16 @@
self.assert_(out.endswith('<a href="http://testing.fr/cubicweb/cwuser/anon" title="">anon</a>'
'</td></tr></tbody></table></div>\n</div>\n</p>\n'))
+ def test_rql_role_with_vid_empty_rset(self):
+ context = self.context()
+ out = rest_publish(context, ':rql:`Any X WHERE X is CWUser, X login "nono":table`')
+ self.assert_(out.endswith('<p><div class="searchMessage"><strong>No result matching query</strong></div>\n</p>\n'))
+
+ def test_rql_role_with_unknown_vid(self):
+ context = self.context()
+ out = rest_publish(context, ':rql:`Any X WHERE X is CWUser:toto`')
+ self.assert_(out.startswith("<p>an error occured while interpreting this rql directive: ObjectNotFound(u'toto',)</p>"))
+
def test_rql_role_without_vid(self):
context = self.context()
out = rest_publish(context, ':rql:`Any X WHERE X is CWUser`')