mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
Merge branch 'develop' into stream_features
This commit is contained in:
commit
b1439df72a
2 changed files with 7 additions and 0 deletions
|
@ -237,6 +237,8 @@ class Unsubscribe(ElementBase):
|
||||||
def getJid(self):
|
def getJid(self):
|
||||||
return JID(self._getAttr('jid'))
|
return JID(self._getAttr('jid'))
|
||||||
|
|
||||||
|
registerStanzaPlugin(Pubsub, Unsubscribe)
|
||||||
|
|
||||||
class Subscribe(ElementBase):
|
class Subscribe(ElementBase):
|
||||||
namespace = 'http://jabber.org/protocol/pubsub'
|
namespace = 'http://jabber.org/protocol/pubsub'
|
||||||
name = 'subscribe'
|
name = 'subscribe'
|
||||||
|
|
|
@ -600,8 +600,13 @@ class SleekTest(unittest.TestCase):
|
||||||
Defaults to the value of self.match_method.
|
Defaults to the value of self.match_method.
|
||||||
"""
|
"""
|
||||||
sent = self.xmpp.socket.next_sent(timeout)
|
sent = self.xmpp.socket.next_sent(timeout)
|
||||||
|
if data is None and sent is None:
|
||||||
|
return
|
||||||
|
if data is None and sent is not None:
|
||||||
|
self.fail("Stanza data was sent: %s" % sent)
|
||||||
if sent is None:
|
if sent is None:
|
||||||
self.fail("No stanza was sent.")
|
self.fail("No stanza was sent.")
|
||||||
|
|
||||||
xml = self.parse_xml(sent)
|
xml = self.parse_xml(sent)
|
||||||
self.fix_namespaces(xml, 'jabber:client')
|
self.fix_namespaces(xml, 'jabber:client')
|
||||||
sent = self.xmpp._build_stanza(xml, 'jabber:client')
|
sent = self.xmpp._build_stanza(xml, 'jabber:client')
|
||||||
|
|
Loading…
Reference in a new issue