From 73d2966e8c10eb6c083a2abacc53f3297d16376e Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 27 Feb 2019 23:04:38 +0100 Subject: Improve epub support --- tests/test_libmat2.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/test_libmat2.py') 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 @@ import unittest import shutil import os +import re import zipfile from libmat2 import pdf, images, audio, office, parser_factory, torrent, harmless @@ -644,7 +645,10 @@ class TestCleaning(unittest.TestCase): self.assertTrue(ret) p = epub.EPUBParser('./tests/data/clean.cleaned.epub') - self.assertEqual(p.get_meta(), {}) + meta = p.get_meta() + res = re.match(meta['OEBPS/content.opf']['metadata'], '^[0-9a-f-]+$') + self.assertNotEqual(res, False) + self.assertTrue(p.remove_all()) os.remove('./tests/data/clean.epub') -- cgit v1.3