Opened 18 years ago
Closed 18 years ago
#3212 closed defect (fixed)
[patch] Client.post() doesn't support multiple values for form values
Reported by: | Owned by: | Russell Keith-Magee | |
---|---|---|---|
Component: | Testing framework | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Client.post doesn't support multi-valued form values. This makes it hard to use with MultipleChoiceField objects. Here's a patch that lets you accomplish that by using lists or tuples in Client.post(), for example:
c = django.test.client.Client()
c.post("/myurl/", {'foo': [1,2,3]})
Attachments (1)
Change History (4)
by , 18 years ago
Attachment: | multi-form-values.diff added |
---|
comment:1 by , 18 years ago
Component: | Admin interface → Unit test system |
---|
comment:2 by , 18 years ago
Owner: | changed from | to
---|
comment:3 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [4774]) Fixes #3212 -- Added code to test client to allow posting of multi-form values (e.g., MultipleChoiceFields). Thanks, Ben Dean Kawamura.