diff --git a/tests/modeltests/files/tests.py b/tests/modeltests/files/tests.py
index e8e7a76..82a1c7d 100644
a
|
b
|
class FileTests(TestCase):
|
54 | 54 | self.assertEqual(list(obj1.normal.chunks(chunk_size=2)), ["co", "nt", "en", "t"]) |
55 | 55 | obj1.normal.close() |
56 | 56 | |
| 57 | # Files can be edited. |
| 58 | obj1 = Storage.objects.get() |
| 59 | obj1.normal.open('w') |
| 60 | obj1.normal.write('new content') |
| 61 | obj1.normal.close() |
| 62 | obj1.normal.open() |
| 63 | self.assertEqual(obj1.normal.read(), 'new content') |
| 64 | |
57 | 65 | # Save another file with the same name. |
58 | 66 | obj2 = Storage() |
59 | 67 | obj2.normal.save("django_test.txt", ContentFile("more content")) |
diff --git a/tests/regressiontests/file_storage/tests.py b/tests/regressiontests/file_storage/tests.py
index 6a7a46a..6f9af1f 100644
a
|
b
|
class FileStorageTests(unittest.TestCase):
|
116 | 116 | |
117 | 117 | f = self.storage.open('storage_test', 'r') |
118 | 118 | self.assertEqual(f.read(), 'storage contents') |
119 | | f.close() |
| 119 | f.open('w') |
| 120 | f.write('new contents') |
| 121 | f.open('r') |
| 122 | self.assertEqual(f.read(), 'new contents') |
120 | 123 | |
121 | 124 | self.storage.delete('storage_test') |
122 | 125 | self.assertFalse(self.storage.exists('storage_test')) |