From 8c7979aae3f9073cc8426613d8d7594ddb560cf7 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 10 Jun 2018 20:19:35 +0200 Subject: Add some tests for non-supported embedded fileformats --- tests/test_libmat2.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/test_libmat2.py') 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): os.remove('-ver') +class TestUnsupportedEmbeddedFiles(unittest.TestCase): + def test_odt_with_svg(self): + shutil.copy('./tests/data/embedded.odt', './tests/data/clean.odt') + p = office.LibreOfficeParser('./tests/data/clean.odt') + self.assertFalse(p.remove_all()) + os.remove('./tests/data/clean.odt') + + def test_docx_with_svg(self): + shutil.copy('./tests/data/embedded.docx', './tests/data/clean.docx') + p = office.MSOfficeParser('./tests/data/clean.docx') + self.assertFalse(p.remove_all()) + os.remove('./tests/data/clean.docx') + class TestUnsupportedFiles(unittest.TestCase): def test_pdf(self): shutil.copy('./tests/test_libmat2.py', './tests/clean.py') -- cgit v1.3