'Test that setting type to \'submit\' clears extra details'

def testSubmitType(self):

    msg = self.Message()
    form = msg['form']
    fields = OrderedDict()
    fields['f1'] = {'type': 'text-single', 'label': 'Username', 'required': True}
    fields['f2'] = {'type': 'text-private', 'label': 'Password', 'required': True}
    fields['f3'] = {'type': 'text-multi', 'label': 'Message', 'value': 'Enter    message.\nA    long    one    even.'}
    fields['f4'] = {'type': 'list-single', 'label': 'Message    Type', 'options': [{'label': 'Cool!', 'value': 'cool'}, {'label': 'Urgh!', 'value': 'urgh'}]}
    form.set_fields(fields)
    form['type'] = 'submit'
    form.set_values({'f1': 'username', 'f2': 'hunter2', 'f3': 'A    long\nmultiline\nmessage', 'f4': 'cool'})
    self.check(form, '\n                                        <x    xmlns="jabber:x:data"    type="submit">\n                                                <field    var="f1">\n                                                        <value>username</value>\n                                                </field>\n                                                <field    var="f2">\n                                                        <value>hunter2</value>\n                                                </field>\n                                                <field    var="f3">\n                                                        <value>A    long</value>\n                                                        <value>multiline</value>\n                                                        <value>message</value>\n                                                </field>\n                                                <field    var="f4">\n                                                        <value>cool</value>\n                                                </field>\n                                        </x>\n                                ', use_values=False)
