summaryrefslogtreecommitdiff
path: root/tests/test_libmat2.py
diff options
context:
space:
mode:
authorjvoisin2019-02-27 23:04:38 +0100
committerjvoisin2019-02-27 23:04:38 +0100
commit73d2966e8c10eb6c083a2abacc53f3297d16376e (patch)
tree24830b2e95097f220379930e8c654ad073c04bc0 /tests/test_libmat2.py
parenteb2e702f3700a0ac88d10a524a5f6c573a52a8dd (diff)
Improve epub support
Diffstat (limited to 'tests/test_libmat2.py')
-rw-r--r--tests/test_libmat2.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py
index 249c56d..f4b1890 100644
--- a/tests/test_libmat2.py
+++ b/tests/test_libmat2.py
@@ -3,6 +3,7 @@
3import unittest 3import unittest
4import shutil 4import shutil
5import os 5import os
6import re
6import zipfile 7import zipfile
7 8
8from libmat2 import pdf, images, audio, office, parser_factory, torrent, harmless 9from libmat2 import pdf, images, audio, office, parser_factory, torrent, harmless
@@ -644,7 +645,10 @@ class TestCleaning(unittest.TestCase):
644 self.assertTrue(ret) 645 self.assertTrue(ret)
645 646
646 p = epub.EPUBParser('./tests/data/clean.cleaned.epub') 647 p = epub.EPUBParser('./tests/data/clean.cleaned.epub')
647 self.assertEqual(p.get_meta(), {}) 648 meta = p.get_meta()
649 res = re.match(meta['OEBPS/content.opf']['metadata'], '^<dc:identifier>[0-9a-f-]+</dc:identifier><dc:title /><dc:language />$')
650 self.assertNotEqual(res, False)
651
648 self.assertTrue(p.remove_all()) 652 self.assertTrue(p.remove_all())
649 653
650 os.remove('./tests/data/clean.epub') 654 os.remove('./tests/data/clean.epub')