diff --git a/tests/test_stream_xep_0060.py b/tests/test_stream_xep_0060.py
index 9feb629..50bbe37 100644
--- a/tests/test_stream_xep_0060.py
+++ b/tests/test_stream_xep_0060.py
@@ -471,11 +471,107 @@ class TestStreamPubsub(SleekTest):
def testPublishMulti(self):
"""Test publishing multiple items."""
- pass
+ payload1 = AtomEntry()
+ payload1['title'] = 'Test 1'
+
+ payload2 = AtomEntry()
+ payload2['title'] = 'Test 2'
+
+ register_stanza_plugin(self.xmpp['xep_0060'].stanza.Item, AtomEntry)
+
+ t = threading.Thread(name='publish_single',
+ target=self.xmpp['xep_0060'].publish,
+ args=('pubsub.example.com', 'somenode'),
+ kwargs={'items': [('ID1', payload1),
+ ('ID2', payload2)]})
+ t.start()
+
+ self.send("""
+
+
+
+ -
+
+ Test 1
+
+
+ -
+
+ Test 2
+
+
+
+
+
+ """, use_values=False)
+
+ self.recv("""
+
+ """)
+
+ t.join()
def testPublishMultiOptions(self):
"""Test publishing multiple items, with options."""
- pass
+ payload1 = AtomEntry()
+ payload1['title'] = 'Test 1'
+
+ payload2 = AtomEntry()
+ payload2['title'] = 'Test 2'
+
+ register_stanza_plugin(self.xmpp['xep_0060'].stanza.Item, AtomEntry)
+
+ options = self.xmpp['xep_0004'].make_form()
+ options.add_field(var='FORM_TYPE', ftype='hidden',
+ value='http://jabber.org/protocol/pubsub#publish-options')
+ options.add_field(var='pubsub#access_model', ftype='text-single',
+ value='presence')
+ options['type'] = 'submit'
+
+ t = threading.Thread(name='publish_single',
+ target=self.xmpp['xep_0060'].publish,
+ args=('pubsub.example.com', 'somenode'),
+ kwargs={'items': [('ID1', payload1),
+ ('ID2', payload2)],
+ 'options': options})
+ t.start()
+
+ self.send("""
+
+
+
+ -
+
+ Test 1
+
+
+ -
+
+ Test 2
+
+
+
+
+
+
+ http://jabber.org/protocol/pubsub#publish-options
+
+
+ presence
+
+
+
+
+
+ """, use_values=False)
+
+ self.recv("""
+
+ """)
+
+ t.join()
def testRetract(self):
"""Test deleting an item."""