diff options
author | Nathan Fritz <fritzy@netflint.net> | 2010-05-27 19:58:57 +0800 |
---|---|---|
committer | Thom Nichols <tmnichols@gmail.com> | 2010-06-01 22:07:52 +0800 |
commit | 194e6bcb5149f145c389fa8837dbe902557d9215 (patch) | |
tree | 9833402892ca0d1f738fc321cfb3c084da590854 /tests | |
parent | 2e7024419a98e0dc69493010faf24b4a2c88d37e (diff) | |
download | slixmpp-194e6bcb5149f145c389fa8837dbe902557d9215.tar.gz slixmpp-194e6bcb5149f145c389fa8837dbe902557d9215.tar.bz2 slixmpp-194e6bcb5149f145c389fa8837dbe902557d9215.tar.xz slixmpp-194e6bcb5149f145c389fa8837dbe902557d9215.zip |
added pubsub state stanzas and scheduled events
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_pubsubstanzas.py | 15 |
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 |