diff options
Diffstat (limited to 'tests/test_libmat2.py')
| -rw-r--r-- | tests/test_libmat2.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py index 89a5811..84eb75e 100644 --- a/tests/test_libmat2.py +++ b/tests/test_libmat2.py | |||
| @@ -17,6 +17,16 @@ class TestParserFactory(unittest.TestCase): | |||
| 17 | self.assertEqual(parser.__class__, audio.MP3Parser) | 17 | self.assertEqual(parser.__class__, audio.MP3Parser) |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | class TestParameterInjection(unittest.TestCase): | ||
| 21 | def test_ver_injection(self): | ||
| 22 | shutil.copy('./tests/data/dirty.png', './-ver') | ||
| 23 | p = images.PNGParser('-ver') | ||
| 24 | meta = p.get_meta() | ||
| 25 | self.assertEqual(meta['Comment'], 'This is a comment, be careful!') | ||
| 26 | self.assertEqual(meta['ModifyDate'], "2018:03:20 21:59:25") | ||
| 27 | os.remove('-ver') | ||
| 28 | |||
| 29 | |||
| 20 | class TestUnsupportedFiles(unittest.TestCase): | 30 | class TestUnsupportedFiles(unittest.TestCase): |
| 21 | def test_pdf(self): | 31 | def test_pdf(self): |
| 22 | shutil.copy('./tests/test_libmat2.py', './tests/clean.py') | 32 | shutil.copy('./tests/test_libmat2.py', './tests/clean.py') |
