core (tests): test fixes

This commit is contained in:
Goffi 2015-04-23 14:19:43 +02:00
commit 0ad78c5072

View file

@ -151,15 +151,16 @@ class XEP_groupblogTest(helpers.SatTestCase):
if not self.__initialised:
client.item_access_pubsub = jid.JID(SERVICE)
xep_0060 = self.host.plugins['XEP-0060']
xep_0060.clients[profile] = helpers_plugins.FakeSatPubSubClient(self.host, xep_0060)
xep_0060.clients[profile].parent = client
self.psclient = xep_0060.clients[profile]
client.pubsub_client = helpers_plugins.FakeSatPubSubClient(self.host, xep_0060)
client.pubsub_client.parent = client
self.psclient = client.pubsub_client
helpers.FakeSAT.getDiscoItems = self.psclient.service_getDiscoItems
self.__initialised = True
return defer.succeed((profile, client))
def _addItem(self, profile, item, parent_node=None):
self.host.plugins['XEP-0060'].clients[profile]._addItem(item, parent_node)
client = self.host.getClient(profile)
client.pubsub_client._addItem(item, parent_node)
def test_sendGroupBlog(self):
self._initialise(C.PROFILE[0])