From 5de31cb8cb83c33d932d5ddf76ff81506c28bdff Mon Sep 17 00:00:00 2001 From: Karen Tracey Date: Sun, 13 Nov 2011 19:05:02 +0000 Subject: 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 --- tests/modeltests/model_forms/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/modeltests/model_forms') diff --git a/tests/modeltests/model_forms/models.py b/tests/modeltests/model_forms/models.py index a960611ffa..35fc9a7bc1 100644 --- a/tests/modeltests/model_forms/models.py +++ b/tests/modeltests/model_forms/models.py @@ -7,13 +7,14 @@ and the examples are probably a poor fit for the ``ModelForm`` syntax. In other words, most of these tests should be rewritten. """ +import os import tempfile from django.core.files.storage import FileSystemStorage from django.db import models -temp_storage_dir = tempfile.mkdtemp() +temp_storage_dir = tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR']) temp_storage = FileSystemStorage(temp_storage_dir) ARTICLE_STATUS = ( -- cgit v1.3