示例#1
0
 def test_interfaces(self):
     result = SearchResult(
         rids=[rid for rid, uid in _DOCMAP.items() if uid in ITEMS],
         idmapper=DMAP,
         resolver=RESOLVE_ALL,
         )
     assert IItemCollection.providedBy(result)
     assert ICollectionSetOperations.providedBy(result)
     assert IUIDItemCollection.providedBy(result)
     assert ISearchResult.providedBy(result)
示例#2
0
 def test_interfaces(self):
     collection = BaseCollection(ITEMS, NAMES)
     assert IItemCollection.providedBy(collection)
     assert ICollectionSetOperations.providedBy(collection)
     assert IUIDItemCollection.providedBy(collection)
     assert not INamedItemCollection.providedBy(collection)