Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14468 closed (fixed)

test_client_regress.models.UploadedFileEncodingTest fails if the mimetypes.guess_type() guesses an alternate zip mimetype

Reported by: Johannes Dollinger Owned by: nobody
Component: Testing framework Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

FAIL: test_guesses_content_type_on_file_encoding (regressiontests.test_client_regress.models.UploadedFileEncodingTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/emulbreh/Projekte/django-dev/trunk/tests/regressiontests/test_client_regress/models.py", line 847, in test_guesses_content_type_on_file_encoding
    encode_file('IGNORE', 'IGNORE', DummyFile("file.zip"))[2])
AssertionError: 'Content-Type: application/zip' != 'Content-Type: application/x-zip-compressed'

Attachments (1)

14468.diff (1.0 KB ) - added by Johannes Dollinger 14 years ago.

Download all attachments as: .zip

Change History (4)

by Johannes Dollinger, 14 years ago

Attachment: 14468.diff added

comment:1 by Russell Keith-Magee, 14 years ago

Has patch: set
Patch needs improvement: set
Triage Stage: UnreviewedReady for checkin

In addition to application/x-zip-compressed, we should probably also be catching application/x-zip and application/x-compress. They're edge cases too; we might as well catch them while we're at it.

Marking RFC though, because adding the extra types into the patch is a trivial modification.

comment:2 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: newclosed

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

comment:3 by Jannis Leidel, 14 years ago

(In [15237]) [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).

Note: See TracTickets for help on using tickets.
Back to Top