diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-11-26 07:17:39 -0500 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-12-01 08:48:22 -0500 |
| commit | 4768197d8a9bb15d695594e852a2a0f8cb4cf549 (patch) | |
| tree | 45d1d599242e1aad079370a00ebd89cf50bc0c5f /tests | |
| parent | cf4e036bdeecef85a7cf9ad52ef83433f06f442e (diff) | |
[6.0.x] Closed temporary files in OverwritingStorageTests.test_save_overwrite_behavior_temp_file().
Backport of a08f1693f37e9aae9eca395020cce0638cb5aa5f from main.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/file_storage/tests.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/file_storage/tests.py b/tests/file_storage/tests.py index 92962bd9a0..c9539c1cf9 100644 --- a/tests/file_storage/tests.py +++ b/tests/file_storage/tests.py @@ -671,9 +671,11 @@ class OverwritingStorageTests(FileStorageTests): content_1 = b"content one" content_2 = b"second content" f_1 = TemporaryUploadedFile("tmp1", "text/plain", 11, "utf8") + self.addCleanup(f_1.close) f_1.write(content_1) f_1.seek(0) f_2 = TemporaryUploadedFile("tmp2", "text/plain", 14, "utf8") + self.addCleanup(f_2.close) f_2.write(content_2) f_2.seek(0) stored_name_1 = self.storage.save(name, f_1) |
