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:
committed by
Aymeric Augustin
parent
934400759d
commit
a8fe12417f
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user