mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Created import-time test temp dirs in known location
Refs #17215. In the same spirit as 5de31cb8cb.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
and where files should be stored.
|
||||
"""
|
||||
|
||||
import os
|
||||
import random
|
||||
import tempfile
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user