diff --git a/tests/regressiontests/file_storage/tests.py b/tests/regressiontests/file_storage/tests.py
index 6a7a46a..fc761b6 100644
|
a
|
b
|
except ImportError:
|
| 18 | 18 | |
| 19 | 19 | from django.conf import settings |
| 20 | 20 | from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured |
| 21 | | from django.core.files.base import ContentFile |
| | 21 | from django.core.files.base import File, ContentFile |
| 22 | 22 | from django.core.files.images import get_image_dimensions |
| 23 | 23 | from django.core.files.storage import FileSystemStorage, get_storage_class |
| 24 | 24 | from django.core.files.uploadedfile import UploadedFile |
| … |
… |
class FileStorageTests(unittest.TestCase):
|
| 356 | 356 | finally: |
| 357 | 357 | os.remove = real_remove |
| 358 | 358 | |
| | 359 | def test_save_from_pipe(self): |
| | 360 | from subprocess import Popen, PIPE |
| | 361 | proc = Popen(['echo', '1'], stdout=PIPE) |
| | 362 | proc.wait() |
| | 363 | self.storage.save('blah', File(proc.stdout)) |
| | 364 | self.assertEqual(self.storage.open('blah').read(), '1\n') |
| | 365 | |
| 359 | 366 | |
| 360 | 367 | class CustomStorage(FileSystemStorage): |
| 361 | 368 | def get_available_name(self, name): |