test/unittest_rset.py
branchstable
changeset 7395 09ffcc04bd21
parent 7298 a448e470c150
child 7791 31bb51ea5485
child 8048 10a0f73d834d
--- a/test/unittest_rset.py	Thu May 19 09:40:44 2011 +0200
+++ b/test/unittest_rset.py	Thu May 19 09:43:23 2011 +0200
@@ -1,5 +1,5 @@
 # coding: utf-8
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -63,6 +63,13 @@
                 result = list(attr_desc_iterator(parse(rql).children[0], idx, idx))
                 self.assertEqual(result, relations)
 
+    def test_subquery_callfunc(self):
+        rql = ('Any A,B,C,COUNT(D) GROUPBY A,B,C WITH A,B,C,D BEING '
+               '(Any YEAR(CD), MONTH(CD), S, X WHERE X is CWUser, X creation_date CD, X in_state S)')
+        rqlst = parse(rql)
+        select, col = rqlst.locate_subquery(2, 'CWUser', None)
+        result = list(attr_desc_iterator(select, col, 2))
+        self.assertEqual(result, [])
 
 
 class ResultSetTC(CubicWebTC):