summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-08-31 16:03:32 -0700
committerLance Stout <lancestout@gmail.com>2011-08-31 16:03:32 -0700
commitb68785e19ebdbf6d3eb638a0fa2b612e9b404868 (patch)
treeebce2b0ed33a7219cf903571aeaaeb782b605b6b /tests
parenta1bbb719e17645959899f862475a1dd28a34ed55 (diff)
downloadslixmpp-b68785e19ebdbf6d3eb638a0fa2b612e9b404868.tar.gz
slixmpp-b68785e19ebdbf6d3eb638a0fa2b612e9b404868.tar.bz2
slixmpp-b68785e19ebdbf6d3eb638a0fa2b612e9b404868.tar.xz
slixmpp-b68785e19ebdbf6d3eb638a0fa2b612e9b404868.zip
Retract stanzas are behaving oddly when using stanza values.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_stream_xep_0060.py28
1 files changed, 24 insertions, 4 deletions
diff --git a/tests/test_stream_xep_0060.py b/tests/test_stream_xep_0060.py
index 50bbe37a..2207cd96 100644
--- a/tests/test_stream_xep_0060.py
+++ b/tests/test_stream_xep_0060.py
@@ -430,7 +430,7 @@ class TestStreamPubsub(SleekTest):
value='presence')
options['type'] = 'submit'
- t = threading.Thread(name='publish_single',
+ t = threading.Thread(name='publish_single_options',
target=self.xmpp['xep_0060'].publish,
args=('pubsub.example.com', 'somenode'),
kwargs={'item_id': 'ID42',
@@ -479,7 +479,7 @@ class TestStreamPubsub(SleekTest):
register_stanza_plugin(self.xmpp['xep_0060'].stanza.Item, AtomEntry)
- t = threading.Thread(name='publish_single',
+ t = threading.Thread(name='publish_multi',
target=self.xmpp['xep_0060'].publish,
args=('pubsub.example.com', 'somenode'),
kwargs={'items': [('ID1', payload1),
@@ -529,7 +529,7 @@ class TestStreamPubsub(SleekTest):
value='presence')
options['type'] = 'submit'
- t = threading.Thread(name='publish_single',
+ t = threading.Thread(name='publish_multi_options',
target=self.xmpp['xep_0060'].publish,
args=('pubsub.example.com', 'somenode'),
kwargs={'items': [('ID1', payload1),
@@ -575,7 +575,27 @@ class TestStreamPubsub(SleekTest):
def testRetract(self):
"""Test deleting an item."""
- pass
+ t = threading.Thread(name='retract',
+ target=self.xmpp['xep_0060'].retract,
+ args=('pubsub.example.com', 'somenode', 'ID1'))
+ t.start()
+
+ self.send("""
+ <iq type="set" id="1" to="pubsub.example.com">
+ <pubsub xmlns="http://jabber.org/protocol/pubsub">
+ <retract node="somenode">
+ <item id="ID1" />
+ </retract>
+ </pubsub>
+ </iq>
+ """, use_values=False)
+
+ self.recv("""
+ <iq type="result" id="1"
+ to="tester@localhost" from="pubsub.example.com" />
+ """)
+
+ t.join()
def testPurge(self):
"""Test removing all items from a node."""