branch | stable |
changeset 6676 | 39763487ba33 |
parent 6673 | 5eb2f1f2c277 |
child 6758 | 28b11ecf319b |
6675:12ee2fe13fa7 | 6676:39763487ba33 |
---|---|
809 |
809 |
810 def test_security_has_text_limit_offset(self): |
810 def test_security_has_text_limit_offset(self): |
811 # use a guest user |
811 # use a guest user |
812 self.session = self.user_groups_session('guests') |
812 self.session = self.user_groups_session('guests') |
813 ueid = self.session.user.eid |
813 ueid = self.session.user.eid |
814 # note: same as the above query but because of the subquery usage, the display differs (not printing solutions for each union) |
814 # note: same as the above query but because of the subquery usage, the |
815 # display differs (not printing solutions for each union) |
|
815 self._test('Any X LIMIT 10 OFFSET 10 WHERE X has_text "bla"', |
816 self._test('Any X LIMIT 10 OFFSET 10 WHERE X has_text "bla"', |
816 [('FetchStep', [('Any E WHERE E type "X", E is Note', [{'E': 'Note'}])], |
817 [('FetchStep', [('Any E WHERE E type "X", E is Note', [{'E': 'Note'}])], |
817 [self.cards, self.system], None, {'E': 'table1.C0'}, []), |
818 [self.cards, self.system], None, {'E': 'table1.C0'}, []), |
818 ('UnionFetchStep', [ |
819 ('UnionFetchStep', [ |
819 ('FetchStep', [('Any X WHERE X has_text "bla", (EXISTS(X owned_by %(ueid)s)) OR ((((EXISTS(D concerne C?, C owned_by %(ueid)s, C type "X", X identity D, C is Division, D is Affaire)) OR (EXISTS(H concerne G?, G owned_by %(ueid)s, G type "X", X identity H, G is SubDivision, H is Affaire))) OR (EXISTS(I concerne F?, F owned_by %(ueid)s, F type "X", X identity I, F is Societe, I is Affaire))) OR (EXISTS(J concerne E?, E owned_by %(ueid)s, X identity J, E is Note, J is Affaire))), X is Affaire' % {'ueid': ueid}, |
820 ('FetchStep', [('Any X WHERE X has_text "bla", (EXISTS(X owned_by %(ueid)s)) OR ((((EXISTS(D concerne C?, C owned_by %(ueid)s, C type "X", X identity D, C is Division, D is Affaire)) OR (EXISTS(H concerne G?, G owned_by %(ueid)s, G type "X", X identity H, G is SubDivision, H is Affaire))) OR (EXISTS(I concerne F?, F owned_by %(ueid)s, F type "X", X identity I, F is Societe, I is Affaire))) OR (EXISTS(J concerne E?, E owned_by %(ueid)s, X identity J, E is Note, J is Affaire))), X is Affaire' % {'ueid': ueid}, |
1936 None, None, [self.cards], {}, []) |
1937 None, None, [self.cards], {}, []) |
1937 ]) |
1938 ]) |
1938 |
1939 |
1939 def test_source_specified_3_2(self): |
1940 def test_source_specified_3_2(self): |
1940 self.skipTest('oops') |
1941 self.skipTest('oops') |
1941 self.set_debug('DBG_MS') |
|
1942 self._test('Any STN WHERE X is Note, X type XT, X in_state ST, ST name STN, X cw_source S, S name "cards"', |
1942 self._test('Any STN WHERE X is Note, X type XT, X in_state ST, ST name STN, X cw_source S, S name "cards"', |
1943 [('OneFetchStep', |
1943 [('OneFetchStep', |
1944 [('Any X,XT WHERE X is Card, X title XT', |
1944 [('Any X,XT WHERE X is Card, X title XT', |
1945 [{'X': 'Card', 'XT': 'String'}])], |
1945 [{'X': 'Card', 'XT': 'String'}])], |
1946 None, None, [self.cards], {}, []) |
1946 None, None, [self.cards], {}, []) |