diff --git a/tests/file_storage/tests.py b/tests/file_storage/tests.py
index baa6098..2921c7f 100644
a
|
b
|
class FileFieldStorageTests(TestCase):
|
670 | 670 | obj.normal.file.seek(0) |
671 | 671 | obj.normal.close() |
672 | 672 | |
| 673 | def test_filefield_context_manager(self): |
| 674 | obj = Storage.objects.create(normal=SimpleUploadedFile('rewritten.txt', b'content')) |
| 675 | with obj.normal as normal: |
| 676 | self.assertEqual(normal.size, 7) |
| 677 | |
| 678 | with obj.normal as normal: |
| 679 | self.assertEqual(normal.size, 7) |
| 680 | |
673 | 681 | def test_duplicate_filename(self): |
674 | 682 | # Multiple files with the same name get _(7 random chars) appended to them. |
675 | 683 | objs = [Storage() for i in range(2)] |