mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.8.x] Normalized usage of the tempfile module.
Specifically stopped using the dir argument.
Backport of a8fe12417f from master
This commit is contained in:
committed by
Tim Graham
parent
fae31f2348
commit
e3953de900
@@ -3322,8 +3322,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