'Test getting all identities of a given
lang from a disco#info stanza.'

def testGetIdentitiesWithLang(self):

    iq = self.Iq()
    iq['disco_info'].add_identity('client', 'pc')
    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')
    expected = set([('client', 'pc', 'no', None)])
    result = iq['disco_info'].get_identities(lang='no')
    self.failUnless((result == expected), ('Identities    do    not    match:\n%s\n%s' % (expected, result)))
