diff options
| author | Carl Meyer <carl@oddbird.net> | 2011-01-26 07:46:19 +0000 |
|---|---|---|
| committer | Carl Meyer <carl@oddbird.net> | 2011-01-26 07:46:19 +0000 |
| commit | 00e7a571c5737c69bc225ae39d3dca6d0fbfd072 (patch) | |
| tree | 1d0808d05eeb32ccfa4e7d6558d284d5fb947551 /tests | |
| parent | 80287f1e8a554290faa6a0c31113a9f4eecf7b79 (diff) | |
Fixed #6456 - Excised FileField file deletion to avoid data loss. Thanks to durdinator for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/modeltests/files/tests.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/modeltests/files/tests.py b/tests/modeltests/files/tests.py index 26808f7d9a..ad5c3a7cc3 100644 --- a/tests/modeltests/files/tests.py +++ b/tests/modeltests/files/tests.py @@ -61,11 +61,10 @@ class FileTests(TestCase): cache.set("obj2", obj2) self.assertEqual(cache.get("obj2").normal.name, "tests/django_test_1.txt") - # Deleting an object deletes the file it uses, if there are no other - # objects still using that file. + # Deleting an object does not delete the file it uses. obj2.delete() obj2.normal.save("django_test.txt", ContentFile("more content")) - self.assertEqual(obj2.normal.name, "tests/django_test_1.txt") + self.assertEqual(obj2.normal.name, "tests/django_test_2.txt") # Multiple files with the same name get _N appended to them. objs = [Storage() for i in range(3)] |
