'Test xml_translate() with <a> elements.'

def test_translate_xml_a(self):

    terms = []
    source = '<t    t-name="stuff">\n                                                                                                <ul    class="nav    navbar-nav">\n                                                                                                                <li>\n                                                                                                                                <a    class="oe_menu_leaf"    href="/web#menu_id=42&amp;action=54">\n                                                                                                                                                <span    class="oe_menu_text">Blah</span>\n                                                                                                                                </a>\n                                                                                                                </li>\n                                                                                                                <li    class="dropdown"    id="menu_more_container"    style="display:    none;">\n                                                                                                                                <a    class="dropdown-toggle"    data-toggle="dropdown"    href="#">More    <b    class="caret"/></a>\n                                                                                                                                <ul    class="dropdown-menu"    id="menu_more"/>\n                                                                                                                </li>\n                                                                                                </ul>\n                                                                                </t>'
    result = xml_translate(terms.append, source)
    self.assertEquals(result, source)
    self.assertItemsEqual(terms, ['<span    class="oe_menu_text">Blah</span>', 'More    <b    class="caret"/>'])
