diff options
Diffstat (limited to 'tests/test_corrupted_files.py')
| -rw-r--r-- | tests/test_corrupted_files.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_corrupted_files.py b/tests/test_corrupted_files.py index 30039e6..5af0e81 100644 --- a/tests/test_corrupted_files.py +++ b/tests/test_corrupted_files.py | |||
| @@ -80,6 +80,14 @@ class TestExplicitelyUnsupportedFiles(unittest.TestCase): | |||
| 80 | os.remove('./tests/data/clean.py') | 80 | os.remove('./tests/data/clean.py') |
| 81 | 81 | ||
| 82 | 82 | ||
| 83 | class TestCorruptedContentTypesOffice(unittest.TestCase): | ||
| 84 | def test_office(self): | ||
| 85 | shutil.copy('./tests/data/malformed_content_types.docx', './tests/data/clean.docx') | ||
| 86 | p = office.MSOfficeParser('./tests/data/clean.docx') | ||
| 87 | self.assertIsNotNone(p) | ||
| 88 | self.assertFalse(p.remove_all()) | ||
| 89 | os.remove('./tests/data/clean.docx') | ||
| 90 | |||
| 83 | class TestCorruptedFiles(unittest.TestCase): | 91 | class TestCorruptedFiles(unittest.TestCase): |
| 84 | def test_pdf(self): | 92 | def test_pdf(self): |
| 85 | shutil.copy('./tests/data/dirty.png', './tests/data/clean.png') | 93 | shutil.copy('./tests/data/dirty.png', './tests/data/clean.png') |
