From fae31f234823474cd2b81efba56fa714cc34d9cd Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 21 Feb 2015 18:56:36 +0100 Subject: [1.8.x] 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. Backport of 934400759de817471ff37d736686201d7ae34e82 from master --- tests/file_uploads/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/file_uploads') diff --git a/tests/file_uploads/tests.py b/tests/file_uploads/tests.py index 39cc2b4df0..1338add474 100644 --- a/tests/file_uploads/tests.py +++ b/tests/file_uploads/tests.py @@ -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') -- cgit v1.3