def test_setOptions(self):
        options = {'pubsub#deliver': False}

        d = self.protocol.setOptions(JID('pubsub.example.org'), 'test',
                                     JID('user@example.org'),
                                     options,
                                     sender=JID('user@example.org'))

        iq = self.stub.output[-1]
        self.assertEqual('pubsub.example.org', iq.getAttribute('to'))
        self.assertEqual('set', iq.getAttribute('type'))
        self.assertEqual('pubsub', iq.pubsub.name)
        self.assertEqual(NS_PUBSUB, iq.pubsub.uri)
        children = list(domish.generateElementsQNamed(iq.pubsub.children,
                                                      'options', NS_PUBSUB))
        self.assertEqual(1, len(children))
        child = children[0]
        self.assertEqual('test', child['node'])

        form = data_form.findForm(child, NS_PUBSUB_SUBSCRIBE_OPTIONS)
        self.assertEqual('submit', form.formType)
        form.typeCheck({'pubsub#deliver': {'type': 'boolean'}})
        self.assertEqual(options, form.getValues())

        response = toResponse(iq, 'result')
        self.stub.send(response)

        return d
setOptions should send out a options-set request.
dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_pubsub.py/PubSubClientTest.test_setOptions