'Test the new XML form of writing with <option> tag instead of options= attribute.'

def test_optioninput_extended_xml(self):

    group_label = 'Are    you    the    Gatekeeper?'
    input1_label = 'input    1    label'
    input2_label = 'input    2    label'
    factory = self.capa_factory_for_problem_xml('                                                <problem    display_name="Woo    Hoo">\n                                                                <optionresponse>\n                                                                            <label>{}</label>\n                                                                            <optioninput    label="{}">\n                                                                                            <option    correct="True"    label="Good    Job">\n                                                                                                            apple\n                                                                                                            <optionhint>\n                                                                                                                            banana\n                                                                                                            </optionhint>\n                                                                                            </option>\n                                                                                            <option    correct="False"    label="blorp">\n                                                                                                            cucumber\n                                                                                                            <optionhint>\n                                                                                                                            donut\n                                                                                                            </optionhint>\n                                                                                            </option>\n                                                                            </optioninput>\n\n                                                                            <optioninput    label="{}">\n                                                                                            <option    correct="True">\n                                                                                                            apple\n                                                                                                            <optionhint>\n                                                                                                                            banana\n                                                                                                            </optionhint>\n                                                                                            </option>\n                                                                                            <option    correct="False">\n                                                                                                            cucumber\n                                                                                                            <optionhint>\n                                                                                                                            donut\n                                                                                                            </optionhint>\n                                                                                            </option>\n                                                                            </optioninput>\n                                                                    </optionresponse>\n                                                </problem>\n                                                '.format(group_label, input1_label, input2_label))
    module = factory.create()
    answer_input_dict = {factory.input_key(2, 1): 'apple', factory.input_key(2, 2): 'cucumber'}
    event = self.get_event_for_answers(module, answer_input_dict)
    self.assertEquals(event['submission'], {factory.answer_key(2, 1): {'group_label': group_label, 'question': input1_label, 'answer': 'apple', 'response_type': 'optionresponse', 'input_type': 'optioninput', 'correct': True, 'variant': ''}, factory.answer_key(2, 2): {'group_label': group_label, 'question': input2_label, 'answer': 'cucumber', 'response_type': 'optionresponse', 'input_type': 'optioninput', 'correct': False, 'variant': ''}})
