Loading tests/bug639/models.py +2 −1 Original line number Diff line number Diff line import os import tempfile from django.core.files.storage import FileSystemStorage Loading @@ -5,7 +6,7 @@ from django.db import models from django.forms import ModelForm temp_storage_dir = tempfile.mkdtemp() temp_storage_dir = tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR']) temp_storage = FileSystemStorage(temp_storage_dir) Loading tests/file_storage/models.py +2 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ and where files should be stored. """ import os import random import tempfile Loading @@ -12,7 +13,7 @@ from django.db import models from django.core.files.storage import FileSystemStorage temp_storage_location = tempfile.mkdtemp() temp_storage_location = tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR']) temp_storage = FileSystemStorage(location=temp_storage_location) Loading tests/file_uploads/tests.py +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ from .models import FileModel UNICODE_FILENAME = 'test-0123456789_中文_Orléans.jpg' MEDIA_ROOT = sys_tempfile.mkdtemp() MEDIA_ROOT = sys_tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR']) UPLOAD_TO = os.path.join(MEDIA_ROOT, 'test_upload') Loading tests/model_fields/models.py +1 −1 Original line number Diff line number Diff line Loading @@ -194,7 +194,7 @@ if Image: attr_class = TestImageFieldFile # Set up a temp directory for file storage. temp_storage_dir = tempfile.mkdtemp() temp_storage_dir = tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR']) temp_storage = FileSystemStorage(temp_storage_dir) temp_upload_to_dir = os.path.join(temp_storage.location, 'tests') Loading Loading
tests/bug639/models.py +2 −1 Original line number Diff line number Diff line import os import tempfile from django.core.files.storage import FileSystemStorage Loading @@ -5,7 +6,7 @@ from django.db import models from django.forms import ModelForm temp_storage_dir = tempfile.mkdtemp() temp_storage_dir = tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR']) temp_storage = FileSystemStorage(temp_storage_dir) Loading
tests/file_storage/models.py +2 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ and where files should be stored. """ import os import random import tempfile Loading @@ -12,7 +13,7 @@ from django.db import models from django.core.files.storage import FileSystemStorage temp_storage_location = tempfile.mkdtemp() temp_storage_location = tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR']) temp_storage = FileSystemStorage(location=temp_storage_location) Loading
tests/file_uploads/tests.py +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ from .models import FileModel UNICODE_FILENAME = 'test-0123456789_中文_Orléans.jpg' MEDIA_ROOT = sys_tempfile.mkdtemp() MEDIA_ROOT = sys_tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR']) UPLOAD_TO = os.path.join(MEDIA_ROOT, 'test_upload') Loading
tests/model_fields/models.py +1 −1 Original line number Diff line number Diff line Loading @@ -194,7 +194,7 @@ if Image: attr_class = TestImageFieldFile # Set up a temp directory for file storage. temp_storage_dir = tempfile.mkdtemp() temp_storage_dir = tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR']) temp_storage = FileSystemStorage(temp_storage_dir) temp_upload_to_dir = os.path.join(temp_storage.location, 'tests') Loading