35 class FakeCardSource(AbstractSource): |
35 class FakeCardSource(AbstractSource): |
36 uri = 'ccc' |
36 uri = 'ccc' |
37 support_entities = {'Card': True, 'Note': True, 'State': True} |
37 support_entities = {'Card': True, 'Note': True, 'State': True} |
38 support_relations = {'in_state': True, 'multisource_rel': True, 'multisource_inlined_rel': True, |
38 support_relations = {'in_state': True, 'multisource_rel': True, 'multisource_inlined_rel': True, |
39 'multisource_crossed_rel': True} |
39 'multisource_crossed_rel': True} |
40 dont_cross_relations = set(('fiche', 'in_state')) |
40 dont_cross_relations = set(('fiche', 'state_of')) |
41 cross_relations = set(('multisource_crossed_rel',)) |
41 cross_relations = set(('multisource_crossed_rel',)) |
42 |
42 |
43 def syntax_tree_search(self, *args, **kwargs): |
43 def syntax_tree_search(self, *args, **kwargs): |
44 return [] |
44 return [] |
45 |
45 |
1975 [('OneFetchStep', [('Any 999999 WHERE O use_email 999999, ((EXISTS(O identity 999998)) OR (EXISTS(O in_group G, G name IN("managers", "staff")))) OR (EXISTS(O in_group G2, 999998 in_group G2, NOT G2 name "users"))', |
1975 [('OneFetchStep', [('Any 999999 WHERE O use_email 999999, ((EXISTS(O identity 999998)) OR (EXISTS(O in_group G, G name IN("managers", "staff")))) OR (EXISTS(O in_group G2, 999998 in_group G2, NOT G2 name "users"))', |
1976 [{'G': 'CWGroup', 'G2': 'CWGroup', 'O': 'CWUser'}])], |
1976 [{'G': 'CWGroup', 'G2': 'CWGroup', 'O': 'CWUser'}])], |
1977 None, None, [self.system], {}, [])], |
1977 None, None, [self.system], {}, [])], |
1978 {'x': 999999, 'u': 999998}) |
1978 {'x': 999999, 'u': 999998}) |
1979 |
1979 |
|
1980 def test_state_of_cross(self): |
|
1981 self._test('DELETE State X WHERE NOT X state_of Y', |
|
1982 [('DeleteEntitiesStep', |
|
1983 [('OneFetchStep', |
|
1984 [('Any X WHERE NOT X state_of Y, X is State, Y is Workflow', |
|
1985 [{'X': 'State', 'Y': 'Workflow'}])], |
|
1986 None, None, [self.system], {}, [])])] |
|
1987 ) |
1980 |
1988 |
1981 class MSPlannerTwoSameExternalSourcesTC(BasePlannerTC): |
1989 class MSPlannerTwoSameExternalSourcesTC(BasePlannerTC): |
1982 """test planner related feature on a 3-sources repository: |
1990 """test planner related feature on a 3-sources repository: |
1983 |
1991 |
1984 * 2 rql sources supporting Card |
1992 * 2 rql sources supporting Card |