From 3db76ff2d05f5470788dd71f3cbc175e167e52a1 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Mon, 17 Jan 2011 23:58:51 +0000 Subject: [PATCH] Fixed #14468 -- Extended the list of content types that the test client could guess when handling zip files. Thanks, Russ and emulbreh. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15236 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/test_client_regress/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/regressiontests/test_client_regress/models.py b/tests/regressiontests/test_client_regress/models.py index 1281b91ad8..e337880a32 100644 --- a/tests/regressiontests/test_client_regress/models.py +++ b/tests/regressiontests/test_client_regress/models.py @@ -844,8 +844,10 @@ class UploadedFileEncodingTest(TestCase): encode_file('IGNORE', 'IGNORE', DummyFile("file.bin"))[2]) self.assertEqual('Content-Type: text/plain', encode_file('IGNORE', 'IGNORE', DummyFile("file.txt"))[2]) - self.assertEqual('Content-Type: application/zip', - encode_file('IGNORE', 'IGNORE', DummyFile("file.zip"))[2]) + self.assertIn(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', encode_file('IGNORE', 'IGNORE', DummyFile("file.unknown"))[2])