Fixed #26058 -- Delegated os.path bits of FileField's filename generation to the Storage.

This commit is contained in:
Cristiano 2016-03-20 22:51:17 -03:00 committed by Tim Graham
parent 8dcf352c03
commit 914c72be2a
8 changed files with 198 additions and 15 deletions

View file

@ -54,10 +54,10 @@ class ImageFieldTestMixin(SerializeMixin):
os.mkdir(temp_storage_dir)
file_path1 = os.path.join(os.path.dirname(upath(__file__)), "4x8.png")
self.file1 = self.File(open(file_path1, 'rb'))
self.file1 = self.File(open(file_path1, 'rb'), name='4x8.png')
file_path2 = os.path.join(os.path.dirname(upath(__file__)), "8x4.png")
self.file2 = self.File(open(file_path2, 'rb'))
self.file2 = self.File(open(file_path2, 'rb'), name='8x4.png')
def tearDown(self):
"""