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:
Tim Graham 2016-06-18 11:06:10 -04:00
parent 625b8e9295
commit cd217de610
3 changed files with 0 additions and 18 deletions

View file

@ -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