Skip to content
Snippets Groups Projects
Commit 58a1563a authored by Julien (jvoisin) Voisin's avatar Julien (jvoisin) Voisin
Browse files

Better test of corrupted MSOffice files

parent f6381680
No related branches found
Tags 0.12.1
No related merge requests found
No preview for this file type
......@@ -89,9 +89,8 @@ class TestExplicitelyUnsupportedFiles(unittest.TestCase):
class TestWrongContentTypesFileOffice(unittest.TestCase):
def test_office_incomplete(self):
shutil.copy('./tests/data/malformed_content_types.docx', './tests/data/clean.docx')
p = office.MSOfficeParser('./tests/data/clean.docx')
self.assertIsNotNone(p)
self.assertFalse(p.remove_all())
with self.assertRaises(ValueError):
office.MSOfficeParser('./tests/data/clean.docx')
os.remove('./tests/data/clean.docx')
def test_office_broken(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment