diff --git a/tests/data/malformed_content_types.docx b/tests/data/malformed_content_types.docx index cc5caf3..edc026d 100644 Binary files a/tests/data/malformed_content_types.docx and b/tests/data/malformed_content_types.docx differ diff --git a/tests/test_corrupted_files.py b/tests/test_corrupted_files.py index d4b40a5..8a8cffe 100644 --- a/tests/test_corrupted_files.py +++ b/tests/test_corrupted_files.py @@ -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):