# HG changeset patch # User Sylvain Thénault # Date 1374135738 -7200 # Node ID dbabdc323e7dba5658fcea8954b2dd7b0aeae8f4 # Parent 9d145b4c4e53430b8bdd50261e9ced9f61e9a4b5 add failing test case related to #3013554 diff -r 9d145b4c4e53 -r dbabdc323e7d 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']