97 |
97 |
98 def test_7(self): |
98 def test_7(self): |
99 rqlst = self._prepare('Personne X,Y where X nom NX, Y nom NX, X eid XE, not Y eid XE') |
99 rqlst = self._prepare('Personne X,Y where X nom NX, Y nom NX, X eid XE, not Y eid XE') |
100 self.assertEquals(rqlst.defined_vars['X']._q_invariant, False) |
100 self.assertEquals(rqlst.defined_vars['X']._q_invariant, False) |
101 self.assertEquals(rqlst.defined_vars['Y']._q_invariant, False) |
101 self.assertEquals(rqlst.defined_vars['Y']._q_invariant, False) |
|
102 |
|
103 def test_8(self): |
|
104 # DISTINCT Any P WHERE P require_group %(g)s, NOT %(u)s has_group_permission P, P is CWPermission |
|
105 rqlst = self._prepare('DISTINCT Any X WHERE A concerne X, NOT N migrated_from X, ' |
|
106 'X is Note, N eid 1') |
|
107 self.assertEquals(rqlst.defined_vars['X']._q_invariant, False) |
102 |
108 |
103 def test_diff_scope_identity_deamb(self): |
109 def test_diff_scope_identity_deamb(self): |
104 rqlst = self._prepare('Any X WHERE X concerne Y, Y is Note, EXISTS(Y identity Z, Z migrated_from N)') |
110 rqlst = self._prepare('Any X WHERE X concerne Y, Y is Note, EXISTS(Y identity Z, Z migrated_from N)') |
105 self.assertEquals(rqlst.defined_vars['Z']._q_invariant, True) |
111 self.assertEquals(rqlst.defined_vars['Z']._q_invariant, True) |
106 self.assertEquals(rqlst.defined_vars['Y']._q_invariant, True) |
112 self.assertEquals(rqlst.defined_vars['Y']._q_invariant, True) |