add failing test case related to #3013554 stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 18 Jul 2013 10:22:18 +0200
branchstable
changeset 9327 dbabdc323e7d
parent 9326 9d145b4c4e53
child 9328 6a355522438c
add failing test case related to #3013554
test/unittest_rqlrewrite.py
--- a/test/unittest_rqlrewrite.py	Tue Nov 12 15:24:57 2013 +0100
+++ b/test/unittest_rqlrewrite.py	Thu Jul 18 10:22:18 2013 +0200
@@ -520,6 +520,18 @@
                              'EXISTS(X owned_by %(A)s), X is IN(Division, Note, Societe))',
                              union.as_string())
 
+    def test_ambiguous_optional_diff_exprs(self):
+        """See #3013554"""
+        self.skipTest('bad request generated (may generate duplicated results)')
+        edef1 = self.schema['Societe']
+        edef2 = self.schema['Division']
+        edef3 = self.schema['Note']
+        with self.temporary_permissions((edef1, {'read': (ERQLExpression('X created_by U'),)}),
+                                        (edef2, {'read': ('users',)}),
+                                        (edef3, {'read': (ERQLExpression('X owned_by U'),)})):
+            union = self.process('Any A,AR,X,CD WHERE A concerne X?, A ref AR, X creation_date CD')
+            self.assertEqual(union.as_string(), 'not generated today')
+
 
     def test_xxxx(self):
         edef1 = self.schema['Societe']