def test_batching_collection_results(self): # call the contentlisting view. Check that it makes # the results a contentlisting, regardless of batching self.folder.invokeFactory("Event", "myevent") contentlisting = self.col.restrictedTraverse("@@contentlisting")(batch=True, b_size=1) # In case of Collections, the result is a plone.batching object self.assertTrue(IBatch.providedBy(contentlisting)) self.assertTrue(verifyObject(IContentListingObject, contentlisting[0])) self.assertEqual(len(contentlisting), 1)
def test_batching_collection_results(self): # call the contentlisting view. Check that it makes # the results a contentlisting, regardless of batching self.folder.invokeFactory('Event', 'myevent') contentlisting = self.col.restrictedTraverse('@@contentlisting')( batch=True, b_size=1) # In case of Collections, the result is a plone.batching object self.assertTrue(IBatch.providedBy(contentlisting)) self.assertTrue(verifyObject(IContentListingObject, contentlisting[0])) self.assertEqual(len(contentlisting), 1)
def updateBatch(self): if IBatch.providedBy(self.values): self.batchProvider = getMultiAdapter((self.context, self.request, self), IBatchProvider, name=self.batchProviderName) self.batchProvider.update()