summaryrefslogtreecommitdiff
path: root/tests/test_stream_xep_0060.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_stream_xep_0060.py')
-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(