diff options
author | Nathan Fritz <fritzy@netflint.net> | 2010-01-08 07:01:19 +0000 |
---|---|---|
committer | Nathan Fritz <fritzy@netflint.net> | 2010-01-08 07:01:19 +0000 |
commit | 218c7318e040cd8acb90dfc445b7388a37756d8b (patch) | |
tree | 41aa0dcd3927632e11117357b440ece7f7814252 /tests/pubsub_stanzas.py | |
parent | 137ef61523d178a12c08da3f544e81a3135f3cf7 (diff) | |
download | slixmpp-218c7318e040cd8acb90dfc445b7388a37756d8b.tar.gz slixmpp-218c7318e040cd8acb90dfc445b7388a37756d8b.tar.bz2 slixmpp-218c7318e040cd8acb90dfc445b7388a37756d8b.tar.xz slixmpp-218c7318e040cd8acb90dfc445b7388a37756d8b.zip |
* added tests
Diffstat (limited to 'tests/pubsub_stanzas.py')
-rw-r--r-- | tests/pubsub_stanzas.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/pubsub_stanzas.py b/tests/pubsub_stanzas.py deleted file mode 100644 index d768a3df..00000000 --- a/tests/pubsub_stanzas.py +++ /dev/null @@ -1,26 +0,0 @@ -from sleekxmpp.plugins.stanza_pubsub import * - -def testAffiliations(): - iq = Iq() - aff1 = Affiliation() - aff1['node'] = 'testnode' - aff1['affiliation'] = 'owner' - aff2 = Affiliation() - aff2['node'] = 'testnode2' - aff2['affiliation'] = 'publisher' - iq['pubsub']['affiliations'].append(aff1) - iq['pubsub']['affiliations'].append(aff2) - print(iq) - iq2 = Iq(None, ET.fromstring("""<iq id="0"><pubsub xmlns="http://jabber.org/protocol/pubsub"><affiliations><affiliation node="testnode" affiliation="owner" /><affiliation node="testnode2" affiliation="publisher" /></affiliations></pubsub></iq>""")) - iq3 = Iq() - values = iq2.getValues() - print(values) - iq3.setValues(values) - print("-"*8) - print(iq3.keys()) - - print(iq3) - print(str(iq) == str(iq2) == str(iq3)) - - -testAffiliations() |