mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Refs #17215: Avoid generating 47 leftover tmp dirs during a clean test run.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -246,7 +246,7 @@ class EmptyModel(models.Model):
|
||||
return "Primary key = %s" % self.id
|
||||
|
||||
|
||||
temp_storage = FileSystemStorage(tempfile.mkdtemp())
|
||||
temp_storage = FileSystemStorage(tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR']))
|
||||
UPLOAD_TO = os.path.join(temp_storage.location, 'test_upload')
|
||||
|
||||
|
||||
@@ -547,4 +547,4 @@ class PrePopulatedPostLargeSlug(models.Model):
|
||||
title = models.CharField(max_length=100)
|
||||
published = models.BooleanField()
|
||||
slug = models.SlugField(max_length=1000)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user