From 38df679a88a19db3a4a82fdb8e20a42c9a53d1a1 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 22 Oct 2018 19:12:39 +0200 Subject: Optimize the handling of problematic files --- tests/test_corrupted_files.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/test_corrupted_files.py') diff --git a/tests/test_corrupted_files.py b/tests/test_corrupted_files.py index 490ea42..82c6c3b 100644 --- a/tests/test_corrupted_files.py +++ b/tests/test_corrupted_files.py @@ -204,3 +204,14 @@ class TestCorruptedFiles(unittest.TestCase): p = video.AVIParser('./tests/data/clean.avi') self.assertFalse(p.remove_all()) os.remove('./tests/data/clean.avi') + + def test_avi_injection(self): + try: + video._get_ffmpeg_path() + except RuntimeError: + raise unittest.SkipTest + + shutil.copy('./tests/data/dirty.torrent', './tests/data/--output.avi') + p = video.AVIParser('./tests/data/--output.avi') + self.assertFalse(p.remove_all()) + os.remove('./tests/data/--output.avi') -- cgit v1.3