diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-01-18 00:00:11 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-01-18 00:00:11 +0000 |
| commit | b305cc33c5827ac8daecbf7395fbccb196f92d47 (patch) | |
| tree | be161bf530693ab7a0e4cd2d798e99be4ef9aa67 | |
| parent | b9db129a7e1f7b50b2263685af934c9d1a35ee0f (diff) | |
[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
| -rw-r--r-- | tests/regressiontests/test_client_regress/models.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/regressiontests/test_client_regress/models.py b/tests/regressiontests/test_client_regress/models.py index 40c7623246..fd8fbfe90a 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]) |
