test: fix the tests

This commit is contained in:
souliane 2015-04-17 19:06:39 +02:00
commit f34a5b8aaf

View file

@ -339,6 +339,7 @@ class FakeRosterProtocol(SatRosterProtocol):
def __init__(self, host, parent):
SatRosterProtocol.__init__(self, host)
self.parent = parent
self._jids = {}
self.addItem(parent.jid)
def addItem(self, jid, *args, **kwargs):
@ -351,7 +352,8 @@ class FakeRosterProtocol(SatRosterProtocol):
if roster_item.name:
attrs['name'] = roster_item.name
self.host.bridge.expectCall("newContact", jid.full(), attrs, roster_item.groups, self.parent.profile)
self.onRosterSet(roster_item)
self._jids[jid] = roster_item
self._registerItem(roster_item)
class FakeXmlStream(object):