'Testing message/pubsub_event/subscription'

def testEventSubscription(self):

    msg = self.Message()
    msg['pubsub_event']['subscription']['node'] = 'pickles'
    msg['pubsub_event']['subscription']['jid'] = 'fritzy@netflint.net/test'
    msg['pubsub_event']['subscription']['subid'] = 'aabb1122'
    msg['pubsub_event']['subscription']['subscription'] = 'subscribed'
    msg['pubsub_event']['subscription']['expiry'] = 'presence'
    msg['type'] = 'headline'
    self.check(msg, '\n                                        <message    type="headline">\n                                                <event    xmlns="http://jabber.org/protocol/pubsub#event">\n                                                        <subscription    node="pickles"    subid="aabb1122"    jid="fritzy@netflint.net/test"    subscription="subscribed"    expiry="presence"    />\n                                                </event>\n                                        </message>')
