test/unittest_rqlrewrite.py
changeset 7790 7e16e056eecb
parent 7555 c3bf459268d7
child 7791 31bb51ea5485
equal deleted inserted replaced
7789:1c8d6eec4c25 7790:7e16e056eecb
   207         rqlst = parse('Any C,A,R WHERE A? inlined_card C, A ref R')
   207         rqlst = parse('Any C,A,R WHERE A? inlined_card C, A ref R')
   208         rewrite(rqlst, {('C', 'X'): (c1,),
   208         rewrite(rqlst, {('C', 'X'): (c1,),
   209                         ('A', 'X'): (c2,),
   209                         ('A', 'X'): (c2,),
   210                         }, {})
   210                         }, {})
   211         # XXX suboptimal
   211         # XXX suboptimal
   212         self.failUnlessEqual(rqlst.as_string(),
   212         self.assertEqual(rqlst.as_string(),
   213                              "Any C,A,R WITH A,R,C BEING "
   213                              "Any C,A,R WITH A,C,R BEING "
   214                              "(Any A,R,C WHERE A ref R, A? inlined_card C, "
   214                              "(Any A,C,R WHERE A? inlined_card C, A ref R, "
   215                              "(A is NULL) OR (EXISTS(A inlined_card B, B require_permission D, "
   215                              "(A is NULL) OR (EXISTS(A inlined_card B, B require_permission D, "
   216                              "B is Card, D is CWPermission)), "
   216                              "B is Card, D is CWPermission)), "
   217                              "A is Affaire, C is Card, EXISTS(C require_permission E, E is CWPermission))")
   217                              "A is Affaire, C is Card, EXISTS(C require_permission E, E is CWPermission))")
   218 
   218 
   219     # def test_optional_var_inlined_has_perm(self):
   219     # def test_optional_var_inlined_has_perm(self):