This commit is contained in:
parent
2712786383
commit
0bc1ac47f7
|
@ -1,6 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
account1 = u'acc1'
|
account1 = u'acc1'
|
||||||
account2 = u'Cool"chârßéµö'
|
account2 = u'Cool"chârßéµö'
|
||||||
|
account3 = u'dingdong.org'
|
||||||
|
|
||||||
contacts = {}
|
contacts = {}
|
||||||
contacts[account1] = {
|
contacts[account1] = {
|
||||||
|
@ -31,5 +32,40 @@ contacts[account2] = {
|
||||||
'ask': None, 'groups': [u'GroupA', u'GroupB'], 'name': None,
|
'ask': None, 'groups': [u'GroupA', u'GroupB'], 'name': None,
|
||||||
'resources': {}, 'subscription': u'both'}
|
'resources': {}, 'subscription': u'both'}
|
||||||
}
|
}
|
||||||
|
contacts[account3] = {
|
||||||
|
#u'guypsych0\\40h.com@msn.dingdong.org': {
|
||||||
|
# 'ask': None, 'groups': [], 'name': None, 'resources': {},
|
||||||
|
# 'subscription': u'both'},
|
||||||
|
u'guypsych0%h.com@msn.delx.cjb.net': {
|
||||||
|
'ask': u'subscribe', 'groups': [], 'name': None,
|
||||||
|
'resources': {}, 'subscription': u'from'},
|
||||||
|
#u'guypsych0%h.com@msn.jabber.wiretrip.org': {
|
||||||
|
# 'ask': None, 'groups': [], 'name': None, 'resources': {},
|
||||||
|
# 'subscription': u'to'},
|
||||||
|
#u'guypsycho\\40g.com@gtalk.dingdong.org': {
|
||||||
|
# 'ask': None, 'groups': [], 'name': None,
|
||||||
|
# 'resources': {}, 'subscription': u'both'}
|
||||||
|
}
|
||||||
|
|
||||||
|
metacontact_data = [
|
||||||
|
[{'account': account3,
|
||||||
|
'jid': u'guypsych0\\40h.com@msn.dingdong.org',
|
||||||
|
'order': 0},
|
||||||
|
{'account': account3,
|
||||||
|
'jid': u'guypsych0%h.com@msn.delx.cjb.net',
|
||||||
|
'order': 0},
|
||||||
|
{'account': account3,
|
||||||
|
'jid': u'guypsych0%h.com@msn.jabber.wiretrip.org',
|
||||||
|
'order': 0},
|
||||||
|
{'account': account3,
|
||||||
|
'jid': u'guypsycho\\40g.com@gtalk.dingdong.org',
|
||||||
|
'order': 0}],
|
||||||
|
|
||||||
|
[{'account': account1,
|
||||||
|
'jid': u'samejid@gajim.org',
|
||||||
|
'order': 0},
|
||||||
|
{'account': account2,
|
||||||
|
'jid': u'samejid@gajim.org',
|
||||||
|
'order': 0}]
|
||||||
|
]
|
||||||
|
|
||||||
# vim: se ts=3:
|
|
||||||
|
|
|
@ -144,10 +144,16 @@ class TestRosterWindowRegrouped(TestRosterWindow):
|
||||||
|
|
||||||
class TestRosterWindowMetaContacts(TestRosterWindowRegrouped):
|
class TestRosterWindowMetaContacts(TestRosterWindowRegrouped):
|
||||||
|
|
||||||
def setUp(self):
|
def test_receive_metacontact_data(self):
|
||||||
gajim.contacts.add_metacontact(account1, u'samejid@gajim.org',
|
for complete_data in metacontact_data:
|
||||||
account2, u'samejid@gajim.org')
|
t_acc = complete_data[0]['account']
|
||||||
TestRosterWindowRegrouped.setUp(self)
|
t_jid = complete_data[0]['jid']
|
||||||
|
data = complete_data[1:]
|
||||||
|
for brother in data:
|
||||||
|
acc = brother['account']
|
||||||
|
jid = brother['jid']
|
||||||
|
gajim.contacts.add_metacontact(t_acc, t_jid, acc, jid)
|
||||||
|
self.roster.setup_and_draw_roster()
|
||||||
|
|
||||||
def test_connect_new_metacontact(self):
|
def test_connect_new_metacontact(self):
|
||||||
self.test_fill_roster_model()
|
self.test_fill_roster_model()
|
||||||
|
@ -165,6 +171,7 @@ class TestRosterWindowMetaContacts(TestRosterWindowRegrouped):
|
||||||
self.assert_model_is_in_sync()
|
self.assert_model_is_in_sync()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue