summaryrefslogtreecommitdiff
path: root/tests/modeltests
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2008-10-10 22:13:16 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2008-10-10 22:13:16 +0000
commitd7c829c98ebb709a7c7bc263c6c195d8155ee7fb (patch)
tree95fd741b792c7aced5ea37feca6c7fb5f3e22f6e /tests/modeltests
parentb21ea0a8363203087e5bcb3004735db0d4143490 (diff)
downloaddjango-d7c829c98ebb709a7c7bc263c6c195d8155ee7fb.tar.gz
Yet more file storage testing cleanup for the sake of buildbots; this should be the last of it, I hope.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests')
-rw-r--r--tests/modeltests/model_forms/models.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/modeltests/model_forms/models.py b/tests/modeltests/model_forms/models.py
index e3821de758..0b99a84cda 100644
--- a/tests/modeltests/model_forms/models.py
+++ b/tests/modeltests/model_forms/models.py
@@ -19,7 +19,8 @@ try:
except NameError:
from django.utils.itercompat import sorted
-temp_storage = FileSystemStorage(tempfile.gettempdir())
+temp_storage_dir = tempfile.mkdtemp()
+temp_storage = FileSystemStorage(temp_storage_dir)
ARTICLE_STATUS = (
(1, 'Draft'),
@@ -1251,4 +1252,8 @@ ValidationError: [u'Select a valid choice. z is not one of the available choices
>>> core = form.save()
>>> core.parent
<Inventory: Pear>
+
+# Clean up
+>>> import shutil
+>>> shutil.rmtree(temp_storage_dir)
"""}