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: ben <ben.dean.kawamura@…> 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)

multi-form-values.diff (660 bytes ) - added by ben <ben.dean.kawamura@…> 18 years ago.

Download all attachments as: .zip

Change History (4)

by ben <ben.dean.kawamura@…>, 18 years ago

Attachment: multi-form-values.diff added

comment:1 by ben <ben.dean.kawamura@…>, 18 years ago

Component: Admin interfaceUnit test system

comment:2 by Russell Keith-Magee, 18 years ago

Owner: changed from Adrian Holovaty to Russell Keith-Magee

comment:3 by Russell Keith-Magee, 18 years ago

Resolution: fixed
Status: newclosed

(In [4774]) Fixes #3212 -- Added code to test client to allow posting of multi-form values (e.g., MultipleChoiceFields). Thanks, Ben Dean Kawamura.

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