test/unittest_selectors.py
branchstable
changeset 7362 b9813c9d32ac
parent 7345 b9eaad6e34c3
child 7368 f1d9e3b9e51e
--- a/test/unittest_selectors.py	Tue May 10 18:50:13 2011 +0200
+++ b/test/unittest_selectors.py	Wed May 11 09:42:02 2011 +0200
@@ -427,6 +427,13 @@
         self.assertEqual(selector(None, req, entity=req.user), 1)
         self.assertEqual(selector(None, req), 0)
 
+    def test_rql_condition_user(self):
+        req = self.request()
+        selector = rql_condition('U login "admin"', user_condition=True)
+        self.assertEqual(selector(None, req), 1)
+        selector = rql_condition('U login "toto"', user_condition=True)
+        self.assertEqual(selector(None, req), 0)
+
 if __name__ == '__main__':
     unittest_main()