mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 19:19:54 +00:00
added missing docstrings to tests and added deprecated warning to basexmpp.send when using xml mask waiting
This commit is contained in:
parent
ecd5a172ed
commit
dd77d2165d
2 changed files with 6 additions and 0 deletions
|
@ -139,6 +139,7 @@ class basexmpp(object):
|
|||
mask = mask.xml
|
||||
data = str(data)
|
||||
if mask is not None:
|
||||
logging.warning("Use of send mask waiters is deprecated")
|
||||
waitfor = Waiter('SendWait_%s' % self.getNewId(), MatchXMLMask(mask))
|
||||
self.registerHandler(waitfor)
|
||||
self.sendRaw(data)
|
||||
|
|
|
@ -61,6 +61,7 @@ class testpubsubstanzas(unittest.TestCase):
|
|||
self.failUnless(xmlstring == str(iq) == str(iq2) == str(iq3))
|
||||
|
||||
def testItems(self):
|
||||
"Testing iq/pubsub/items stanzas"
|
||||
iq = self.ps.Iq()
|
||||
iq['pubsub']['items']
|
||||
payload = ET.fromstring("""<thinger xmlns="http://andyet.net/protocol/thinger" x="1" y='2'><child1 /><child2 normandy='cheese' foo='bar' /></thinger>""")
|
||||
|
@ -81,6 +82,7 @@ class testpubsubstanzas(unittest.TestCase):
|
|||
self.failUnless(xmlstring == str(iq) == str(iq2) == str(iq3))
|
||||
|
||||
def testCreate(self):
|
||||
"Testing iq/pubsub/create&configure stanzas"
|
||||
from sleekxmpp.plugins import xep_0004
|
||||
iq = self.ps.Iq()
|
||||
iq['pubsub']['create']['configure']
|
||||
|
@ -96,6 +98,7 @@ class testpubsubstanzas(unittest.TestCase):
|
|||
self.failUnless(xmlstring == str(iq) == str(iq2) == str(iq3))
|
||||
|
||||
def testDefault(self):
|
||||
"Testing iq/default stanzas"
|
||||
from sleekxmpp.plugins import xep_0004
|
||||
iq = self.ps.Iq()
|
||||
iq['pubsub']['default']
|
||||
|
@ -111,6 +114,7 @@ class testpubsubstanzas(unittest.TestCase):
|
|||
self.failUnless(xmlstring == str(iq) == str(iq2) == str(iq3))
|
||||
|
||||
def testSubscribe(self):
|
||||
"Testing iq/pubsub/subscribe stanzas"
|
||||
from sleekxmpp.plugins import xep_0004
|
||||
iq = self.ps.Iq()
|
||||
iq['pubsub']['subscribe']['options']
|
||||
|
@ -129,6 +133,7 @@ class testpubsubstanzas(unittest.TestCase):
|
|||
self.failUnless(xmlstring == str(iq) == str(iq2) == str(iq3))
|
||||
|
||||
def testPublish(self):
|
||||
"Testing iq/pubsub/publish stanzas"
|
||||
iq = self.ps.Iq()
|
||||
iq['pubsub']['publish']['node'] = 'thingers'
|
||||
payload = ET.fromstring("""<thinger xmlns="http://andyet.net/protocol/thinger" x="1" y='2'><child1 /><child2 normandy='cheese' foo='bar' /></thinger>""")
|
||||
|
|
Loading…
Reference in a new issue