summaryrefslogtreecommitdiff
path: root/tests/test_stream_xep_0060.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-08-30 21:57:11 -0700
committerLance Stout <lancestout@gmail.com>2011-08-30 21:57:11 -0700
commit13fdab01398ba69de42006064358624a8742b1f5 (patch)
tree742c6568a421500a25e6d28caf649de9d5075f3a /tests/test_stream_xep_0060.py
parent2ce617b2ced7975ce3b79e70d90daea2b8b32045 (diff)
downloadslixmpp-13fdab01398ba69de42006064358624a8742b1f5.tar.gz
slixmpp-13fdab01398ba69de42006064358624a8742b1f5.tar.bz2
slixmpp-13fdab01398ba69de42006064358624a8742b1f5.tar.xz
slixmpp-13fdab01398ba69de42006064358624a8742b1f5.zip
Test and fix XEP-0060 delete_node()
Diffstat (limited to 'tests/test_stream_xep_0060.py')
-rw-r--r--tests/test_stream_xep_0060.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/test_stream_xep_0060.py b/tests/test_stream_xep_0060.py
index cb93bbf6..1d912ca5 100644
--- a/tests/test_stream_xep_0060.py
+++ b/tests/test_stream_xep_0060.py
@@ -102,5 +102,27 @@ class TestStreamPubsub(SleekTest):
t.join()
+ def testDeleteNode(self):
+ """Test deleting a node"""
+ t = threading.Thread(name='delete_node',
+ target=self.xmpp['xep_0060'].delete_node,
+ args=('pubsub.example.com', 'some_node'))
+ t.start()
+
+ self.send("""
+ <iq type="set" to="pubsub.example.com" id="1">
+ <pubsub xmlns="http://jabber.org/protocol/pubsub#owner">
+ <delete node="some_node" />
+ </pubsub>
+ </iq>
+ """)
+
+ self.recv("""
+ <iq type="result" id="1"
+ to="tester@localhost" from="pubsub.example.com" />
+ """)
+
+ t.join()
+
suite = unittest.TestLoader().loadTestsFromTestCase(TestStreamPubsub)