示例#1
0
 def test_find_ids_none(self):
     # dodgy IHasAlias marker
     alsoProvides(self.folder['d1'], IHasAlias)
     
     info = IAliasInformation(self.folder['d1'])
     aliases = list(info.findAliasIds())
     self.assertEquals(0, len(aliases))
示例#2
0
 def test_find_ids_single(self):
     relation = RelationValue(self.intids.getId(self.folder['d1']))
     self.folder.invokeFactory('collective.alias', 'a1', _aliasTarget=relation)
     
     info = IAliasInformation(self.folder['d1'])
     
     aliases = list(info.findAliasIds())
     self.assertEquals(1, len(aliases))
     self.assertEquals(self.intids.getId(self.folder['a1']), aliases[0])