From dd77d2165d5c3175cc4adda07520d6054ff0c934 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Wed, 7 Apr 2010 23:32:15 -0700 Subject: added missing docstrings to tests and added deprecated warning to basexmpp.send when using xml mask waiting --- sleekxmpp/basexmpp.py | 1 + tests/test_pubsubstanzas.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py index 585ecacb..764f8c55 100644 --- a/sleekxmpp/basexmpp.py +++ b/sleekxmpp/basexmpp.py @@ -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) diff --git a/tests/test_pubsubstanzas.py b/tests/test_pubsubstanzas.py index 4c3737d7..4f9faf75 100644 --- a/tests/test_pubsubstanzas.py +++ b/tests/test_pubsubstanzas.py @@ -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("""""") @@ -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("""""") -- cgit v1.2.3