Fixed #6009 -- Added regression tests to show that uploading non-ASCII

filenames now works properly. Patch from Leah Culver.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7987 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2008-07-19 18:47:59 +00:00
parent a103786971
commit 344383284c
3 changed files with 26 additions and 0 deletions

View file

@ -802,6 +802,9 @@ ValidationError: [u'The submitted file is empty.']
>>> type(f.clean(SimpleUploadedFile('name', 'Some File Content')))
<class 'django.core.files.uploadedfile.SimpleUploadedFile'>
>>> type(f.clean(SimpleUploadedFile('我隻氣墊船裝滿晒鱔.txt', 'मेरी मँडराने वाली नाव सर्पमीनों से भरी ह')))
<class 'django.core.files.uploadedfile.SimpleUploadedFile'>
>>> type(f.clean(SimpleUploadedFile('name', 'Some File Content'), 'files/test4.pdf'))
<class 'django.core.files.uploadedfile.SimpleUploadedFile'>