From ec01e45ed1f811a88c39f17f92a30f2f225a6ebc Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Thu, 1 Sep 2011 11:19:25 -0700 Subject: Add ability for a user to get retrieve subscriptions, with tests. --- tests/test_stream_xep_0060.py | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_stream_xep_0060.py b/tests/test_stream_xep_0060.py index 9ba01468..1ace0f96 100644 --- a/tests/test_stream_xep_0060.py +++ b/tests/test_stream_xep_0060.py @@ -626,7 +626,7 @@ class TestStreamPubsub(SleekTest): """) def testGetNodeSubscriptions(self): - """Test retrieving the subscriptions for a node.""" + """Test retrieving all subscriptions for a node.""" self.xmpp['xep_0060'].get_node_subscriptions( 'pubsub.example.com', 'somenode', @@ -639,4 +639,32 @@ class TestStreamPubsub(SleekTest): """) + def testGetSubscriptions(self): + """Test retrieving a users's subscriptions.""" + self.xmpp['xep_0060'].get_subscriptions( + 'pubsub.example.com', + block=False) + self.send(""" + + + + + + """) + + def testGetSubscriptionsForNode(self): + """Test retrieving a users's subscriptions for a given node.""" + self.xmpp['xep_0060'].get_subscriptions( + 'pubsub.example.com', + node='somenode', + block=False) + self.send(""" + + + + + + """) + + suite = unittest.TestLoader().loadTestsFromTestCase(TestStreamPubsub) -- cgit v1.2.3