mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.6.x] Created import-time test temp dirs in known location
Refs #17215. In the same spirit as5de31cb8cb. Backport of809362518dfrom master.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
from django.core.files.storage import FileSystemStorage
|
||||
@@ -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)
|
||||
|
||||
class Photo(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user