From 462b375c8f9ff22cdd4fe282dd90b0a5154a938c Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Thu, 1 Sep 2011 12:08:35 -0700 Subject: Owners can modify subscriptions/affiliations. With tests. 94% coverage for the main pubsub plugin! (91% including stanzas) --- tests/test_stream_xep_0060.py | 52 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'tests') diff --git a/tests/test_stream_xep_0060.py b/tests/test_stream_xep_0060.py index b90359f9..7839d991 100644 --- a/tests/test_stream_xep_0060.py +++ b/tests/test_stream_xep_0060.py @@ -693,5 +693,57 @@ class TestStreamPubsub(SleekTest): """) + def testGetNodeAffiliations(self): + """Test getting the affiliations for a node.""" + self.xmpp['xep_0060'].get_node_affiliations( + 'pubsub.example.com', + 'somenode', + block=False) + self.send(""" + + + + + + """) + + def testModifySubscriptions(self): + """Test owner modifying node subscriptions.""" + self.xmpp['xep_0060'].modify_subscriptions( + 'pubsub.example.com', + 'somenode', + subscriptions=[('user@example.com', 'subscribed'), + ('foo@example.net', 'none')], + block=False) + self.send(""" + + + + + + + + + """) + + def testModifyAffiliations(self): + """Test owner modifying node affiliations.""" + self.xmpp['xep_0060'].modify_affiliations( + 'pubsub.example.com', + 'somenode', + affiliations=[('user@example.com', 'publisher'), + ('foo@example.net', 'none')], + block=False) + self.send(""" + + + + + + + + + """) + suite = unittest.TestLoader().loadTestsFromTestCase(TestStreamPubsub) -- cgit v1.2.3