--- a/server/test/unittest_msplanner.py Wed Sep 16 14:16:19 2009 +0200
+++ b/server/test/unittest_msplanner.py Wed Sep 16 14:17:12 2009 +0200
@@ -1961,13 +1961,23 @@
None, None, [self.system], {}, [])],
{'x': 999998, 'u': 999999})
- def test_nonregr_identity_no_source_access(self):
+ def test_nonregr_identity_no_source_access_1(self):
repo._type_source_cache[999999] = ('CWUser', 'ldap', 999998)
self._test('Any S WHERE S identity U, S eid %(s)s, U eid %(u)s',
[('OneFetchStep', [('Any 999999 WHERE 999999 identity 999999', [{}])],
None, None, [self.system], {}, [])],
{'s': 999999, 'u': 999999})
+ def test_nonregr_identity_no_source_access_2(self):
+ repo._type_source_cache[999999] = ('EmailAddress', 'system', 999999)
+ repo._type_source_cache[999998] = ('CWUser', 'ldap', 999998)
+ self._test('Any X WHERE O use_email X, ((EXISTS(O identity U)) OR (EXISTS(O in_group G, G name IN("managers", "staff")))) OR (EXISTS(O in_group G2, U in_group G2, NOT G2 name "users")), X eid %(x)s, U eid %(u)s',
+ [('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"))',
+ [{'G': 'CWGroup', 'G2': 'CWGroup', 'O': 'CWUser'}])],
+ None, None, [self.system], {}, [])],
+ {'x': 999999, 'u': 999998})
+
+
class MSPlannerTwoSameExternalSourcesTC(BasePlannerTC):
"""test planner related feature on a 3-sources repository: