From 1ff0ea6e9bd11788ca6f1ab09291f177934f589e Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Mon, 5 Jul 2021 12:05:13 +0200 Subject: [PATCH] Fixed isolation of test_filename_traversal_upload(). shutil.rmtree(MEDIA_ROOT) is already called as a class cleanup. --- tests/file_uploads/tests.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/file_uploads/tests.py b/tests/file_uploads/tests.py index 8b5d1de26f..145d714a76 100644 --- a/tests/file_uploads/tests.py +++ b/tests/file_uploads/tests.py @@ -624,7 +624,6 @@ class FileUploadTests(TestCase): def test_filename_traversal_upload(self): os.makedirs(UPLOAD_TO, exist_ok=True) - self.addCleanup(shutil.rmtree, MEDIA_ROOT) tests = [ '../test.txt', '../test.txt',