Fixed isolation of test_filename_traversal_upload().

shutil.rmtree(MEDIA_ROOT) is already called as a class cleanup.
This commit is contained in:
Mariusz Felisiak 2021-07-05 12:05:13 +02:00 committed by GitHub
parent aba9c2de66
commit 1ff0ea6e9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -624,7 +624,6 @@ class FileUploadTests(TestCase):
def test_filename_traversal_upload(self): def test_filename_traversal_upload(self):
os.makedirs(UPLOAD_TO, exist_ok=True) os.makedirs(UPLOAD_TO, exist_ok=True)
self.addCleanup(shutil.rmtree, MEDIA_ROOT)
tests = [ tests = [
'../test.txt', '../test.txt',
'../test.txt', '../test.txt',