mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Guaranteed removal of temporary files during tests.
Dropped the DJANGO_TEST_TEMP_DIR environment variable. Before this change, proper removal depended on the developer passing dir=os.environ['DJANGO_TEST_TMP_DIR'] to tempfile functions.
This commit is contained in:
parent
e83aba0e2c
commit
934400759d
11 changed files with 21 additions and 20 deletions
|
@ -22,7 +22,7 @@ from . import uploadhandler
|
|||
from .models import FileModel
|
||||
|
||||
UNICODE_FILENAME = 'test-0123456789_中文_Orléans.jpg'
|
||||
MEDIA_ROOT = sys_tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR'])
|
||||
MEDIA_ROOT = sys_tempfile.mkdtemp()
|
||||
UPLOAD_TO = os.path.join(MEDIA_ROOT, 'test_upload')
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue