From 068e7c5652947c4a6a367cdc107f1f1042013cd7 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 18 Jan 2014 21:30:01 +0000 Subject: Fix https://labs.riseup.net/code/issues/6604 --- test/libtest.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/libtest.py') diff --git a/test/libtest.py b/test/libtest.py index f052b6e..cbc807f 100644 --- a/test/libtest.py +++ b/test/libtest.py @@ -7,6 +7,7 @@ import os import sys +import shutil import tarfile import tempfile import test @@ -157,6 +158,13 @@ class TestArchiveProcessing(test.MATTest): unsupported_files = set(current_file.is_clean(list_unsupported=True)) self.assertEqual(unsupported_files, set(('mat.desktop', 'README.security', 'setup.py'))) + def test_archive_unwritable_content(self): + path = os.path.join(self.tmpdir, './unwritable_content.zip') + shutil.copy2('./unwritable_content.zip', self.tmpdir) + current_file = MAT.mat.create_class_file(path, False, add2archive=False) + current_file.remove_all() + current_file = MAT.mat.create_class_file(path, False, add2archive=False) + self.assertTrue(current_file.is_clean()) def get_tests(): ''' Returns every libtests''' -- cgit v1.3