summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-09-01 13:25:35 -0700
committerLance Stout <lancestout@gmail.com>2011-09-01 13:25:35 -0700
commitd7fc2aaa9cd8427f73c78f1e6bfbc1c9e1569cf6 (patch)
tree00e289fb37f49efb011d4c21d051cea316be9bca /tests
parent8471a485d1f9be3dc1f1c022ff49bee0b292cb6d (diff)
downloadslixmpp-d7fc2aaa9cd8427f73c78f1e6bfbc1c9e1569cf6.tar.gz
slixmpp-d7fc2aaa9cd8427f73c78f1e6bfbc1c9e1569cf6.tar.bz2
slixmpp-d7fc2aaa9cd8427f73c78f1e6bfbc1c9e1569cf6.tar.xz
slixmpp-d7fc2aaa9cd8427f73c78f1e6bfbc1c9e1569cf6.zip
Add ability to get global/node default subscription options.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_stream_xep_0060.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/test_stream_xep_0060.py b/tests/test_stream_xep_0060.py
index 7839d991..51a80c10 100644
--- a/tests/test_stream_xep_0060.py
+++ b/tests/test_stream_xep_0060.py
@@ -574,6 +574,33 @@ class TestStreamPubsub(SleekTest):
</iq>
""")
+ def testGetSubscriptionGlobalDefaultOptions(self):
+ """Test getting the subscription options for a node/JID."""
+ self.xmpp['xep_0060'].get_subscription_options(
+ 'pubsub.example.com',
+ block=False)
+ self.send("""
+ <iq type="get" id="1" to="pubsub.example.com">
+ <pubsub xmlns="http://jabber.org/protocol/pubsub">
+ <default />
+ </pubsub>
+ </iq>
+ """, use_values=False)
+
+ def testGetSubscriptionNodeDefaultOptions(self):
+ """Test getting the subscription options for a node/JID."""
+ self.xmpp['xep_0060'].get_subscription_options(
+ 'pubsub.example.com',
+ node='somenode',
+ block=False)
+ self.send("""
+ <iq type="get" id="1" to="pubsub.example.com">
+ <pubsub xmlns="http://jabber.org/protocol/pubsub">
+ <default node="somenode" />
+ </pubsub>
+ </iq>
+ """, use_values=False)
+
def testGetSubscriptionOptions(self):
"""Test getting the subscription options for a node/JID."""
self.xmpp['xep_0060'].get_subscription_options(