mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #16833 -- Removed undocumented mixin parameter from the Storage.open() method as this was an undocumented and obscure feature. Thanks to Marty and Russell for sanity-checking.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -231,26 +231,6 @@ class FileStorageTests(unittest.TestCase):
|
||||
self.storage.base_url = None
|
||||
self.assertRaises(ValueError, self.storage.url, 'test.file')
|
||||
|
||||
def test_file_with_mixin(self):
|
||||
"""
|
||||
File storage can get a mixin to extend the functionality of the
|
||||
returned file.
|
||||
"""
|
||||
self.assertFalse(self.storage.exists('test.file'))
|
||||
|
||||
class TestFileMixin(object):
|
||||
mixed_in = True
|
||||
|
||||
f = ContentFile('custom contents')
|
||||
f_name = self.storage.save('test.file', f)
|
||||
|
||||
self.assertTrue(isinstance(
|
||||
self.storage.open('test.file', mixin=TestFileMixin),
|
||||
TestFileMixin
|
||||
))
|
||||
|
||||
self.storage.delete('test.file')
|
||||
|
||||
def test_listdir(self):
|
||||
"""
|
||||
File storage returns a tuple containing directories and files.
|
||||
|
||||
Reference in New Issue
Block a user