summaryrefslogtreecommitdiff
path: root/tests/test_pubsubstanzas.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2010-05-27 04:58:57 -0700
committerNathan Fritz <fritzy@netflint.net>2010-05-27 04:58:57 -0700
commit3a28f9e5d247b9124e0d14c26c2a6e79aaee86ff (patch)
tree0d0cbd55785b8c06a86268e6de66201924f3dd55 /tests/test_pubsubstanzas.py
parent0bda5fd3f28da14478db87c98fb89f647994deaa (diff)
downloadslixmpp-3a28f9e5d247b9124e0d14c26c2a6e79aaee86ff.tar.gz
slixmpp-3a28f9e5d247b9124e0d14c26c2a6e79aaee86ff.tar.bz2
slixmpp-3a28f9e5d247b9124e0d14c26c2a6e79aaee86ff.tar.xz
slixmpp-3a28f9e5d247b9124e0d14c26c2a6e79aaee86ff.zip
added pubsub state stanzas and scheduled events
Diffstat (limited to 'tests/test_pubsubstanzas.py')
-rw-r--r--tests/test_pubsubstanzas.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_pubsubstanzas.py b/tests/test_pubsubstanzas.py
index 55407c16..089ee180 100644
--- a/tests/test_pubsubstanzas.py
+++ b/tests/test_pubsubstanzas.py
@@ -97,6 +97,21 @@ class testpubsubstanzas(unittest.TestCase):
iq3.setValues(values)
self.failUnless(xmlstring == str(iq) == str(iq2) == str(iq3))
+ def testState(self):
+ "Testing iq/psstate stanzas"
+ from sleekxmpp.plugins import xep_0004
+ iq = self.ps.Iq()
+ iq['psstate']['node']= 'mynode'
+ iq['psstate']['item']= 'myitem'
+ pl = ET.Element('{http://andyet.net/protocol/pubsubqueue}claimed')
+ iq['psstate']['payload'] = pl
+ xmlstring = """<iq id="0"><state xmlns="http://jabber.org/protocol/psstate" node="mynode" item="myitem"><claimed xmlns="http://andyet.net/protocol/pubsubqueue" /></state></iq>"""
+ iq2 = self.ps.Iq(None, self.ps.ET.fromstring(xmlstring))
+ iq3 = self.ps.Iq()
+ values = iq2.getValues()
+ iq3.setValues(values)
+ self.failUnless(xmlstring == str(iq) == str(iq2) == str(iq3))
+
def testDefault(self):
"Testing iq/pubsub_owner/default stanzas"
from sleekxmpp.plugins import xep_0004