summaryrefslogtreecommitdiff
path: root/tests/test_pubsubstanzas.py
diff options
context:
space:
mode:
authorThom Nichols <tmnichols@gmail.com>2010-06-01 22:40:37 -0400
committerThom Nichols <tmnichols@gmail.com>2010-06-01 22:40:37 -0400
commit1780ca900a9a78347745d95e7d8934ffae9d7594 (patch)
treeb65b78a036ac8ec7b63d6c620a73e22ed10f2aed /tests/test_pubsubstanzas.py
parent8e95ae2948228ddc6d1b32eca2e64b847c756a71 (diff)
parente6c2fde2834fafbc35b52da7e523f2b351f53a15 (diff)
downloadslixmpp-1780ca900a9a78347745d95e7d8934ffae9d7594.tar.gz
slixmpp-1780ca900a9a78347745d95e7d8934ffae9d7594.tar.bz2
slixmpp-1780ca900a9a78347745d95e7d8934ffae9d7594.tar.xz
slixmpp-1780ca900a9a78347745d95e7d8934ffae9d7594.zip
merged a lot of fritzy's changes
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 5353f907..dc41fc30 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