1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Normalized usage of the tempfile module.

Specifically stopped using the dir argument.
This commit is contained in:
Aymeric Augustin
2015-02-21 19:18:54 +01:00
committed by Aymeric Augustin
parent 934400759d
commit a8fe12417f
6 changed files with 31 additions and 36 deletions

View File

@@ -3315,8 +3315,7 @@ class AdminInlineFileUploadTest(TestCase):
# Set up test Picture and Gallery.
# These must be set up here instead of in fixtures in order to allow Picture
# to use a NamedTemporaryFile.
tdir = tempfile.gettempdir()
file1 = tempfile.NamedTemporaryFile(suffix=".file1", dir=tdir)
file1 = tempfile.NamedTemporaryFile(suffix=".file1")
file1.write(b'a' * (2 ** 21))
filename = file1.name
file1.close()