Opened 17 years ago
Closed 16 years ago
#6945 closed (invalid)
django/test/client.py:encode_multipart cannot encode multiple files
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If one wants to test multiple file upload it would be nice if I could say
c.post(url, {'files':(a, b, c)}
where a, b, c are file-like objects. I could provide a patch if there is interes in this?
Note:
See TracTickets
for help on using tickets.
If you have multiple files being uploaded on a form, each one will be an independent <input type='file'>; as a result, your post dictionary should be {'file1':a,'file2':b,'file3:'c}.