diff --git a/src/test/test_plugin_misc_groupblog.py b/src/test/test_plugin_misc_groupblog.py index 7b6748f5..f2467001 100644 --- a/src/test/test_plugin_misc_groupblog.py +++ b/src/test/test_plugin_misc_groupblog.py @@ -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]) diff --git a/src/test/test_plugin_xep_0313.py b/src/test/test_plugin_xep_0313.py index a73a70cb..6d07f8bd 100644 --- a/src/test/test_plugin_xep_0313.py +++ b/src/test/test_plugin_xep_0313.py @@ -151,7 +151,7 @@ class XEP_0313Test(helpers.SatTestCase): """ % (("H_%d" % domish.Element._idCounter), SERVICE) start = datetime.datetime(2010, 8, 7, 0, 0, 0, tzinfo=tzutc()) form = buildForm(start=start) - rsm = RSMRequest(max=10) + rsm = RSMRequest(max_=10) d = self.plugin.queryArchive(SERVICE_JID, form=form, rsm=rsm, profile_key=C.PROFILE[0]) d.addCallback(lambda dummy: self.assertEqualXML(self.host.getSentMessageXml(0), xml, True)) return d @@ -173,7 +173,7 @@ class XEP_0313Test(helpers.SatTestCase): """ % (("H_%d" % domish.Element._idCounter), SERVICE) start = datetime.datetime(2010, 8, 7, 0, 0, 0, tzinfo=tzutc()) form = buildForm(start=start) - rsm = RSMRequest(max=10, after=u'09af3-cc343-b409f') + rsm = RSMRequest(max_=10, after=u'09af3-cc343-b409f') d = self.plugin.queryArchive(SERVICE_JID, form=form, rsm=rsm, profile_key=C.PROFILE[0]) d.addCallback(lambda dummy: self.assertEqualXML(self.host.getSentMessageXml(0), xml, True)) return d diff --git a/src/tmp/wokkel/delay.py b/src/tmp/wokkel/delay.py index 0af1ad83..f933c327 100644 --- a/src/tmp/wokkel/delay.py +++ b/src/tmp/wokkel/delay.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # -*- test-case-name: wokkel.test.test_delay -*- # # SàT adaptation for wokkel.delay diff --git a/src/tmp/wokkel/mam.py b/src/tmp/wokkel/mam.py index 3f5d7828..c036e113 100644 --- a/src/tmp/wokkel/mam.py +++ b/src/tmp/wokkel/mam.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # -*- test-case-name: wokkel.test.test_mam -*- # # SàT Wokkel extension for Message Archive Management (XEP-0313) @@ -157,8 +158,9 @@ class MAMPrefs(): @type never: C{list} """ - def __init__(self, default, always=None, never=None): - assert default in ('always', 'never', 'roster') + def __init__(self, default=None, always=None, never=None): + if default is not None: + assert default in ('always', 'never', 'roster') self.default = default if always is not None: assert isinstance(always, list) diff --git a/src/tmp/wokkel/pubsub.py b/src/tmp/wokkel/pubsub.py index f6210889..a6345a9b 100755 --- a/src/tmp/wokkel/pubsub.py +++ b/src/tmp/wokkel/pubsub.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # -*- test-case-name: wokkel.test.test_pubsub -*- # # SàT adaptation for wokkel.pubsub @@ -1256,7 +1257,7 @@ class PubSubService(XMPPHandler, IQHandlerMixin): if request is None: return defer.succeed(None) - # Process the request itself, + # Process the request itself, if resource is not self: try: handler = getattr(resource, request.verb) diff --git a/src/tmp/wokkel/rsm.py b/src/tmp/wokkel/rsm.py index 1df47166..077b29ca 100644 --- a/src/tmp/wokkel/rsm.py +++ b/src/tmp/wokkel/rsm.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # -*- test-case-name: wokkel.test.test_rsm -*- # # SàT Wokkel extension for Result Set Management (XEP-0059)