def test_getitem(self):
        fields = [data_form.Field(var='botname', value='The Jabber Bot'),
                  data_form.Field('boolean', var='public', value=True),
                  data_form.Field('list-multi', var='features',
                                                values=['news', 'search'])]
        form = data_form.Form('submit', fields=fields)
        self.assertEqual('The Jabber Bot', form['botname'])
        self.assertTrue(form['public'])
        self.assertEqual(['news', 'search'], form['features'])
Using Form as a mapping will yield the value of fields keyed by name.
dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_data_form.py/FormTest.test_getitem