diff options
author | Nathan Fritz <nathan@andyet.net> | 2010-06-01 21:45:15 -0700 |
---|---|---|
committer | Nathan Fritz <nathan@andyet.net> | 2010-06-01 21:45:15 -0700 |
commit | 18e27d65ce47d877d6b2c810979df640aba7d8ba (patch) | |
tree | 942ed2d45a54e830d6e7c005e3f872c480477866 /tests/test_pubsubstanzas.py | |
parent | 0c39567f208db4938614e9723901037d8801fb25 (diff) | |
parent | aa916c9ac893a976c8e26ee07ca4a9768a5e1680 (diff) | |
download | slixmpp-18e27d65ce47d877d6b2c810979df640aba7d8ba.tar.gz slixmpp-18e27d65ce47d877d6b2c810979df640aba7d8ba.tar.bz2 slixmpp-18e27d65ce47d877d6b2c810979df640aba7d8ba.tar.xz slixmpp-18e27d65ce47d877d6b2c810979df640aba7d8ba.zip |
Merge branch 'develop' of github.com:fritzy/SleekXMPP into develop
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 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 |