mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
FIxed #8156: UploadedFile.__repr__ now returns a string, a good __repr__ should.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8636 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# coding: utf-8
|
||||
"""
|
||||
Tests for the file storage mechanism
|
||||
|
||||
@@ -72,6 +73,14 @@ u'custom_storage.2'
|
||||
# Cleanup the temp dir
|
||||
>>> os.rmdir(temp_dir)
|
||||
|
||||
|
||||
# Regression test for #8156: files with unicode names I can't quite figure out the
|
||||
# encoding situation between doctest and this file, but the actual repr doesn't
|
||||
# matter; it just shouldn't return a unicode object.
|
||||
>>> from django.core.files.uploadedfile import UploadedFile
|
||||
>>> uf = UploadedFile(name=u'¿Cómo?',content_type='text')
|
||||
>>> uf.__repr__()
|
||||
'<UploadedFile: ... (text)>'
|
||||
"""
|
||||
|
||||
# Tests for a race condition on file saving (#4948).
|
||||
|
||||
Reference in New Issue
Block a user