'Test that sending the last presence works.'

def testSendLastPresence(self):

    self.stream_start(plugins=[])
    self.xmpp.send_presence(pshow=u'dnd')
    self.xmpp.auto_authorize = True
    self.xmpp.auto_subscribe = True
    self.send(u'\n                                        <presence>\n                                                <show>dnd</show>\n                                        </presence>\n                                ')
    self.recv(u'\n                                        <presence    from="user@localhost"\n                                                                                to="tester@localhost"\n                                                                                type="subscribe"    />\n                                ')
    self.send(u'\n                                        <presence    to="user@localhost"\n                                                                                type="subscribed"    />\n                                ')
    self.send(u'\n                                        <presence    to="user@localhost">\n                                                <show>dnd</show>\n                                        </presence>\n                                ')
