def test_epub(self): the_epub = EpubFile(self.test_epub) copied_epub = the_epub.copy(os.path.join(self.root, "test", "test_copy.epub")) copied_epub.unzip() self.assertTrue(os.path.isfile(os.path.join(copied_epub.zipdir, "mimetype"))) copied_epub.rezip() self.assertTrue(zipfile.is_zipfile(copied_epub.filepath)) copied_epub.delete()
def test_epub(self): the_epub = EpubFile(self.test_epub) copied_epub = the_epub.copy( os.path.join(self.root, 'test', 'test_copy.epub')) copied_epub.unzip() self.assertTrue( os.path.isfile(os.path.join(copied_epub.zipdir, 'mimetype'))) copied_epub.rezip() self.assertTrue(zipfile.is_zipfile(copied_epub.filepath)) copied_epub.delete()
def test_epub_file(self): the_file = Py7File(self.test_epub) copied_file = the_file.copy(os.path.join(self.root, "test", "test_copy.epub")) epub_file_obj = file(copied_file.filepath) the_epub = EpubFile(epub_file_obj) the_epub.unzip() self.assertTrue(os.path.isfile(os.path.join(the_epub.zipdir, "mimetype"))) the_epub.rezip() self.assertTrue(zipfile.is_zipfile(copied_file.filepath)) copied_file.delete()
def test_epub_file(self): the_file = Py7File(self.test_epub) copied_file = the_file.copy( os.path.join(self.root, 'test', 'test_copy.epub')) epub_file_obj = file(copied_file.filepath) the_epub = EpubFile(epub_file_obj) the_epub.unzip() self.assertTrue( os.path.isfile(os.path.join(the_epub.zipdir, 'mimetype'))) the_epub.rezip() self.assertTrue(zipfile.is_zipfile(copied_file.filepath)) copied_file.delete()