mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Reverted "Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File."
This reverts commit 1b407050dd
as it
introduces a regression in the test for refs #26772.
This commit is contained in:
parent
625b8e9295
commit
cd217de610
3 changed files with 0 additions and 18 deletions
|
@ -10,7 +10,6 @@ import threading
|
|||
import time
|
||||
import unittest
|
||||
from datetime import datetime, timedelta
|
||||
from tempfile import NamedTemporaryFile
|
||||
|
||||
from django.core.cache import cache
|
||||
from django.core.exceptions import SuspiciousFileOperation, SuspiciousOperation
|
||||
|
@ -860,13 +859,6 @@ class FileFieldStorageTests(TestCase):
|
|||
with temp_storage.open('tests/stringio') as f:
|
||||
self.assertEqual(f.read(), b'content')
|
||||
|
||||
def test_save_temporary_file(self):
|
||||
storage = Storage()
|
||||
with NamedTemporaryFile() as f:
|
||||
f.write(b'content')
|
||||
storage.normal = File(f)
|
||||
storage.save() # no crash
|
||||
|
||||
|
||||
# Tests for a race condition on file saving (#4948).
|
||||
# This is written in such a way that it'll always pass on platforms
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue