1
0
mirror of https://github.com/django/django.git synced 2025-07-05 02:09:13 +00:00

[1.2.X] Fixed #14468 -- Extended the list of content types that the test client could guess when handling zip files. Thanks, Russ and emulbreh.

Backport from trunk (r15236).

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2011-01-18 00:00:11 +00:00
parent b9db129a7e
commit b305cc33c5

View File

@ -844,8 +844,10 @@ class UploadedFileEncodingTest(TestCase):
encode_file('IGNORE', 'IGNORE', DummyFile("file.bin"))[2]) encode_file('IGNORE', 'IGNORE', DummyFile("file.bin"))[2])
self.assertEqual('Content-Type: text/plain', self.assertEqual('Content-Type: text/plain',
encode_file('IGNORE', 'IGNORE', DummyFile("file.txt"))[2]) encode_file('IGNORE', 'IGNORE', DummyFile("file.txt"))[2])
self.assertEqual('Content-Type: application/zip', self.assertIn(encode_file('IGNORE', 'IGNORE', DummyFile("file.zip"))[2], (
encode_file('IGNORE', 'IGNORE', DummyFile("file.zip"))[2]) 'Content-Type: application/x-compress',
'Content-Type: application/x-zip',
'Content-Type: application/x-zip-compressed'))
self.assertEqual('Content-Type: application/octet-stream', self.assertEqual('Content-Type: application/octet-stream',
encode_file('IGNORE', 'IGNORE', DummyFile("file.unknown"))[2]) encode_file('IGNORE', 'IGNORE', DummyFile("file.unknown"))[2])