'Testing adding URI attribute to extended stanza address.'

def testAddURI(self):

    msg = self.Message()
    addr = msg['addresses'].addAddress(atype='to', jid='to@header1.org', node='foo')
    self.check(msg, '\n                                        <message>\n                                                <addresses    xmlns="http://jabber.org/protocol/address">\n                                                        <address    node="foo"    jid="to@header1.org"    type="to"    />\n                                                </addresses>\n                                        </message>\n                                ')
    addr['uri'] = 'mailto:to@header2.org'
    self.check(msg, '\n                                        <message>\n                                                <addresses    xmlns="http://jabber.org/protocol/address">\n                                                        <address    type="to"    uri="mailto:to@header2.org"    />\n                                                </addresses>\n                                        </message>\n                                ')
