summaryrefslogtreecommitdiff
path: root/tests/test_stream_xep_0060.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-08-31 21:09:25 -0700
committerLance Stout <lancestout@gmail.com>2011-08-31 21:09:25 -0700
commit3f9ca0366bc7728cec4572db9cbdc6fd7ac90140 (patch)
tree99363602d57b81b1deca1f286babcea262b106d5 /tests/test_stream_xep_0060.py
parentb68785e19ebdbf6d3eb638a0fa2b612e9b404868 (diff)
downloadslixmpp-3f9ca0366bc7728cec4572db9cbdc6fd7ac90140.tar.gz
slixmpp-3f9ca0366bc7728cec4572db9cbdc6fd7ac90140.tar.bz2
slixmpp-3f9ca0366bc7728cec4572db9cbdc6fd7ac90140.tar.xz
slixmpp-3f9ca0366bc7728cec4572db9cbdc6fd7ac90140.zip
Add test for purging a pubsub node.
Diffstat (limited to 'tests/test_stream_xep_0060.py')
-rw-r--r--tests/test_stream_xep_0060.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/test_stream_xep_0060.py b/tests/test_stream_xep_0060.py
index 2207cd96..c250a86e 100644
--- a/tests/test_stream_xep_0060.py
+++ b/tests/test_stream_xep_0060.py
@@ -599,7 +599,25 @@ class TestStreamPubsub(SleekTest):
def testPurge(self):
"""Test removing all items from a node."""
- pass
+ t = threading.Thread(name='purge',
+ target=self.xmpp['xep_0060'].purge,
+ args=('pubsub.example.com', 'somenode'))
+ t.start()
+
+ self.send("""
+ <iq type="set" id="1" to="pubsub.example.com">
+ <pubsub xmlns="http://jabber.org/protocol/pubsub#owner">
+ <purge node="somenode" />
+ </pubsub>
+ </iq>
+ """, use_values=False)
+
+ self.recv("""
+ <iq type="result" id="1"
+ to="tester@localhost" from="pubsub.example.com" />
+ """)
+
+ t.join()
def testGetItem(self):
"""Test retrieving a single item."""