Opened 16 years ago
Closed 15 years ago
#10115 closed (duplicate)
Allow test client to guess files' mimetypes
Description ¶
Currently, all files posted through the test client are sent as 'application/octet-stream'. To test views that rely on mimetypes you have to create a request object from scratch, which is quite tedious. It'd be nice to allow python to guess the mimetypes (therefore simulating a browser's encoding) to make the process easier.
See discussion in django-users list: http://groups.google.com/group/django-users/browse_thread/thread/4e168903ec91b068
See also patch attached.
Change History (4)
by , 16 years ago
Attachment: | 10115. test_mimetypes.diff added |
---|
comment:1 by , 16 years ago
I'm not sure why the patch doesn't display correctly in Trac. You'll have to download it to see it.
comment:2 by , 16 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 15 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #11159 (I know that one's newer but it has a test and everything on the latest codebase)
Patch contains test and doc