'Test selectively replacing identities based on language.'

def testAddBatchIdentitiesWithLang(self):

    iq = self.Iq()
    iq['disco_info'].add_identity('client', 'pc', lang='no')
    iq['disco_info'].add_identity('client', 'pc', lang='en')
    iq['disco_info'].add_identity('client', 'pc', lang='fr')
    identities = [('client', 'bot', 'fr', 'Bot'), ('client', 'bot', 'en', 'Bot')]
    iq['disco_info'].set_identities(identities, lang='fr')
    self.check(iq, '\n                                        <iq>\n                                                <query    xmlns="http://jabber.org/protocol/disco#info">\n                                                        <identity    category="client"    type="pc"    xml:lang="no"    />\n                                                        <identity    category="client"    type="pc"    xml:lang="en"    />\n                                                        <identity    category="client"\n                                                                                                type="bot"\n                                                                                                xml:lang="fr"\n                                                                                                name="Bot"    />\n                                                        <identity    category="client"\n                                                                                                type="bot"\n                                                                                                xml:lang="en"\n                                                                                                name="Bot"    />\n                                                </query>\n                                        </iq>\n                                ')
