diff options
author | Tom Nichols <tmnichols@gmail.com> | 2010-06-02 15:45:51 -0400 |
---|---|---|
committer | Tom Nichols <tmnichols@gmail.com> | 2010-06-02 15:45:51 -0400 |
commit | 77bff9cce7deff133017c3aa2c36ff121adfd544 (patch) | |
tree | 4eed9803932e32dd6e691b9dc2c6dc8b081dbb01 /tests/test_pubsubstanzas.py | |
parent | 3f41fdd231998aeb68a7490f723d3c092bd7e380 (diff) | |
parent | 7930ed22f2371ba3405f9644f427bec9554d2a15 (diff) | |
download | slixmpp-77bff9cce7deff133017c3aa2c36ff121adfd544.tar.gz slixmpp-77bff9cce7deff133017c3aa2c36ff121adfd544.tar.bz2 slixmpp-77bff9cce7deff133017c3aa2c36ff121adfd544.tar.xz slixmpp-77bff9cce7deff133017c3aa2c36ff121adfd544.zip |
Merge branch 'hacks' of git@github.com:tomstrummer/SleekXMPP into hacks
Diffstat (limited to 'tests/test_pubsubstanzas.py')
-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 |