'Testing iq/pubsub/subscriptions/subscription stanzas'

def testSubscriptions(self):

    iq = self.Iq()
    sub1 = pubsub.Subscription()
    sub1['node'] = 'testnode'
    sub1['jid'] = 'steve@myserver.tld/someresource'
    sub2 = pubsub.Subscription()
    sub2['node'] = 'testnode2'
    sub2['jid'] = 'boogers@bork.top/bill'
    sub2['subscription'] = 'subscribed'
    iq['pubsub']['subscriptions'].append(sub1)
    iq['pubsub']['subscriptions'].append(sub2)
    self.check(iq, '\n                                        <iq    id="0">\n                                                <pubsub    xmlns="http://jabber.org/protocol/pubsub">\n                                                        <subscriptions>\n                                                                <subscription    node="testnode"    jid="steve@myserver.tld/someresource"    />\n                                                                <subscription    node="testnode2"    jid="boogers@bork.top/bill"    subscription="subscribed"    />\n                                                        </subscriptions>\n                                                </pubsub>\n                                        </iq>')
