diff options
| author | jvoisin | 2020-11-06 16:05:42 +0100 |
|---|---|---|
| committer | jvoisin | 2020-11-06 16:05:42 +0100 |
| commit | 58a1563a9935115ac7444d57433aa892887d1b0f (patch) | |
| tree | b32a5448b61129847a069aec94764a00389efa1e /tests/test_corrupted_files.py | |
| parent | f638168033583329db1cd2af7b929a0000f10169 (diff) | |
Better test of corrupted MSOffice files
Diffstat (limited to 'tests/test_corrupted_files.py')
| -rw-r--r-- | tests/test_corrupted_files.py | 5 |
1 files changed, 2 insertions, 3 deletions
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): | |||
| 89 | class TestWrongContentTypesFileOffice(unittest.TestCase): | 89 | class TestWrongContentTypesFileOffice(unittest.TestCase): |
| 90 | def test_office_incomplete(self): | 90 | def test_office_incomplete(self): |
| 91 | shutil.copy('./tests/data/malformed_content_types.docx', './tests/data/clean.docx') | 91 | shutil.copy('./tests/data/malformed_content_types.docx', './tests/data/clean.docx') |
| 92 | p = office.MSOfficeParser('./tests/data/clean.docx') | 92 | with self.assertRaises(ValueError): |
| 93 | self.assertIsNotNone(p) | 93 | office.MSOfficeParser('./tests/data/clean.docx') |
| 94 | self.assertFalse(p.remove_all()) | ||
| 95 | os.remove('./tests/data/clean.docx') | 94 | os.remove('./tests/data/clean.docx') |
| 96 | 95 | ||
| 97 | def test_office_broken(self): | 96 | def test_office_broken(self): |
