1
0
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:
Aymeric Augustin
2015-02-21 19:18:54 +01:00
committed by Tim Graham
parent fae31f2348
commit e3953de900
6 changed files with 31 additions and 36 deletions

View File

@@ -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()