From 6cfbd52138488f135329dd77cd596a0dd982fdeb Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Fri, 10 Oct 2008 22:14:24 +0000 Subject: [1.0.X] Yet more file storage testing cleanup for the sake of buildbots; this should be the last of it, I hope. Backport of r9226 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9227 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/model_forms/models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/modeltests/model_forms/models.py') 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 + +# Clean up +>>> import shutil +>>> shutil.rmtree(temp_storage_dir) """} -- cgit v1.3