Testing Django Forms that Contain a MultipleChoiceField

It’s pretty simple. Just return a Python list of values:

data = {
    'a_field': u'1',
    'a_multiple_choice_field': ['achoice', 'another_choice']
}
response = client.post(view_url, data)
Advertisements