diff options
| author | jvoisin | 2018-06-10 20:19:35 +0200 |
|---|---|---|
| committer | jvoisin | 2018-06-10 20:19:35 +0200 |
| commit | 8c7979aae3f9073cc8426613d8d7594ddb560cf7 (patch) | |
| tree | e77106b36e3fca458d3c3ded03b80dcd72227f3c /tests/test_libmat2.py | |
| parent | b310a18e697c6c8d854c0547932b611dbb0d880a (diff) | |
Add some tests for non-supported embedded fileformats
Diffstat (limited to 'tests/test_libmat2.py')
| -rw-r--r-- | tests/test_libmat2.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py index 7deeadc..c85f425 100644 --- a/tests/test_libmat2.py +++ b/tests/test_libmat2.py | |||
| @@ -27,6 +27,19 @@ class TestParameterInjection(unittest.TestCase): | |||
| 27 | os.remove('-ver') | 27 | os.remove('-ver') |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | class TestUnsupportedEmbeddedFiles(unittest.TestCase): | ||
| 31 | def test_odt_with_svg(self): | ||
| 32 | shutil.copy('./tests/data/embedded.odt', './tests/data/clean.odt') | ||
| 33 | p = office.LibreOfficeParser('./tests/data/clean.odt') | ||
| 34 | self.assertFalse(p.remove_all()) | ||
| 35 | os.remove('./tests/data/clean.odt') | ||
| 36 | |||
| 37 | def test_docx_with_svg(self): | ||
| 38 | shutil.copy('./tests/data/embedded.docx', './tests/data/clean.docx') | ||
| 39 | p = office.MSOfficeParser('./tests/data/clean.docx') | ||
| 40 | self.assertFalse(p.remove_all()) | ||
| 41 | os.remove('./tests/data/clean.docx') | ||
| 42 | |||
| 30 | class TestUnsupportedFiles(unittest.TestCase): | 43 | class TestUnsupportedFiles(unittest.TestCase): |
| 31 | def test_pdf(self): | 44 | def test_pdf(self): |
| 32 | shutil.copy('./tests/test_libmat2.py', './tests/clean.py') | 45 | shutil.copy('./tests/test_libmat2.py', './tests/clean.py') |
