Esempio n. 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)
Esempio n. 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)