diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-10-10 22:14:24 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-10-10 22:14:24 +0000 |
| commit | 6cfbd52138488f135329dd77cd596a0dd982fdeb (patch) | |
| tree | e8c88af88ba0b402b7916f2b73af8c1a1be1e704 /tests/modeltests/model_forms/models.py | |
| parent | 4d692e6af1b1bb02c7b65d4a86415a5294898185 (diff) | |
[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
Diffstat (limited to 'tests/modeltests/model_forms/models.py')
| -rw-r--r-- | tests/modeltests/model_forms/models.py | 7 |
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) """} |
