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

def test_translate_xml_attribute(self):

    terms = []
    source = '<field    name="foo"    position="attributes">\n                                                                                                <attribute    name="string">Translate    this</attribute>\n                                                                                                <attribute    name="option">Do    not    translate    this</attribute>\n                                                                                </field>'
    result = xml_translate(terms.append, source)
    self.assertEquals(result, source)
    self.assertItemsEqual(terms, ['Translate    this'])
