diff options
author | Lance Stout <lancestout@gmail.com> | 2011-09-01 13:25:35 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2011-09-01 13:25:35 -0700 |
commit | d7fc2aaa9cd8427f73c78f1e6bfbc1c9e1569cf6 (patch) | |
tree | 00e289fb37f49efb011d4c21d051cea316be9bca /tests/test_stream_xep_0060.py | |
parent | 8471a485d1f9be3dc1f1c022ff49bee0b292cb6d (diff) | |
download | slixmpp-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/test_stream_xep_0060.py')
-rw-r--r-- | tests/test_stream_xep_0060.py | 27 |
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( |