'Verify that legacy problem is handled correctly.'

@ddt.unpack
@ddt.data({'question': 'Once    we    become    predictable,    we    become    ______?', 'label_attr': 'Once    we    become    predictable,    we    become    ______?'}, {'question': 'Once    we    become    predictable,    we    become    ______?<img    src="img/src"/>', 'label_attr': 'Once    we    become    predictable,    we    become    ______?'})
def test_legacy_problem(self, question, label_attr):

    xml = '\n                                <problem>\n                                                <p>Be    sure    to    check    your    spelling.</p>\n                                                <p>{}</p>\n                                                <stringresponse    answer="vulnerable"    type="ci">\n                                                                <textline    label="{}"    size="40"/>\n                                                </stringresponse>\n                                </problem>\n                                '.format(question, label_attr)
    problem = new_loncapa_problem(xml)
    self.assertEqual(problem.problem_data, {'1_2_1': {'label': question, 'descriptions': {}}})
    self.assertEqual(len(problem.tree.xpath("//*[normalize-space(text())='{}']".format(question))), 0)
