Exemplo n.º 1
0
 def test_groups_property(self):
     members = SiteMembers(self.portal)
     members._groups = None  # force uncached
     groups = members.groups
     assert IGroups.providedBy(groups)
     assert aq_base(groups.context) is aq_base(self.portal)
     assert members.groups is groups  # cached, identical
     members._groups = None  # force uncached again
     assert IGroups.providedBy(members.groups)
     assert members.groups is not groups  # cached, new adapter
 def test_groups_property(self):
     members = SiteMembers(self.portal)
     members._groups = None  # force uncached
     groups = members.groups
     assert IGroups.providedBy(groups)
     assert aq_base(groups.context) is aq_base(self.portal)
     assert members.groups is groups   # cached, identical
     members._groups = None  # force uncached again
     assert IGroups.providedBy(members.groups)
     assert members.groups is not groups  # cached, new adapter