'Test events when a stream error is received.'

def test_receiveStreamError(self):

    xs = self.xmlstream
    xs.dataReceived("<stream:stream    xmlns='jabber:client'    xmlns:stream='http://etherx.jabber.org/streams'    from='example.com'    id='12345'    version='1.0'>")
    xs.dataReceived('<stream:error/>')
    self.assertTrue(self.gotStreamError)
    self.assertTrue(self.gotStreamEnd)
