'Test subscribing to a node, with options.'

def testSubscribeWithOptions(self):

    opts = self.xmpp['xep_0004'].make_form()
    opts.add_field(var='FORM_TYPE', value='http://jabber.org/protocol/pubsub#subscribe_options', ftype='hidden')
    opts.add_field(var='pubsub#digest', value=False, ftype='boolean')
    opts['type'] = 'submit'
    self.xmpp['xep_0060'].subscribe('pubsub.example.com', 'somenode', options=opts, block=False)
    self.send('\n                                        <iq    type="set"    id="1"    to="pubsub.example.com">\n                                                <pubsub    xmlns="http://jabber.org/protocol/pubsub">\n                                                        <subscribe    node="somenode"    jid="tester@localhost"    />\n                                                        <options>\n                                                                <x    xmlns="jabber:x:data"    type="submit">\n                                                                        <field    var="FORM_TYPE">\n                                                                                <value>http://jabber.org/protocol/pubsub#subscribe_options</value>\n                                                                        </field>\n                                                                        <field    var="pubsub#digest">\n                                                                                <value>0</value>\n                                                                        </field>\n                                                                </x>\n                                                        </options>\n                                                </pubsub>\n                                        </iq>\n                                ')
