def test_imagesImportedCorrectly(self): """ Tests if images were imported correctly """ brains = self.rootEpubFolder["Pictures"].getFolderContents({"portal_type": "Image"}) img1 = brains[0].getObject() self.failUnless(IImportedImage.providedBy(img1)) self.failUnless(len(brains) == 9)
def test_imagesImportedCorrectly(self): """ Tests if images were imported correctly """ brains = self.rootEpubFolder['Pictures'].getFolderContents( {'portal_type': 'Image'}) img1 = brains[0].getObject() self.failUnless(IImportedImage.providedBy(img1)) self.failUnless(len(brains) == 9)
def isImportedImage(self): """ Boolean if Epub IImportedImage is provided by current context """ return IImportedImage.providedBy(self.context)