Пример #1
0
    def test_folderStructure(self):
        """ Tests the folderStructure of the epub contenttype
        """
        self.failUnless(self.rootEpubFolder is not None)
        self.failUnless(IImportedBook.providedBy(self.rootEpubFolder))

        chapter = getattr(self.rootEpubFolder, 'chapter1.xhtml')
        self.failUnless(IImportedChapter.providedBy(chapter))
        self.failUnless(chapter.Title() == 'Climate change impact in Europe')
        self.failUnless(chapter.Description() == \
                "The earth's climate has not changed many times in the course "
                "of its long history. Most of these changes occurred over "
                "hundreds, thousands or millions of years and were driven by "
                "natural phenomena such as variations in the Earth's orbit "
                "around the sun, variations in the Earth's axis, fluctuations "
                "in the sun's activity and volcanic eruptions.")

        chapter = getattr(self.rootEpubFolder, 'cover.xhtml')
        self.failUnless(chapter.portal_type == "Document")
Пример #2
0
    def test_folderStructure(self):
        """ Tests the folderStructure of the epub contenttype
        """
        self.failUnless(self.rootEpubFolder is not None)
        self.failUnless(IImportedBook.providedBy(self.rootEpubFolder))

        chapter = getattr(self.rootEpubFolder, 'chapter1.xhtml')
        self.failUnless(IImportedChapter.providedBy(chapter))
        self.failUnless(chapter.Title() == 'Climate change impact in Europe')
        self.failUnless(chapter.Description() == \
                "The earth's climate has not changed many times in the course "
                "of its long history. Most of these changes occurred over "
                "hundreds, thousands or millions of years and were driven by "
                "natural phenomena such as variations in the Earth's orbit "
                "around the sun, variations in the Earth's axis, fluctuations "
                "in the sun's activity and volcanic eruptions.")

        chapter = getattr(self.rootEpubFolder, 'cover.xhtml')
        self.failUnless(chapter.portal_type == "Document")
Пример #3
0
 def isImportedChapter(self):
     """ Boolean if Epub IImportedChapter is provided by current context
     """
     return IImportedChapter.providedBy(self.context)
Пример #4
0
 def isImportedChapter(self):
     """ Boolean if Epub IImportedChapter is provided by current context
     """
     return IImportedChapter.providedBy(self.context)