'L{Request.processingFailed} when the site has C{displayTracebacks} set
to C{True} writes out the failure, making UTF-8 items into HTML
entities.'

def test_processingFailedDisplayTracebackHandlesUnicode(self):

    d = DummyChannel()
    request = server.Request(d, 1)
    request.site = server.Site(resource.Resource())
    request.site.displayTracebacks = True
    fail = failure.Failure(Exception(u'\u2603'))
    request.processingFailed(fail)
    self.assertIn('&#9731;', request.transport.written.getvalue())
    self.flushLoggedErrors(UnicodeError)
    self.assertEqual(1, len(self.flushLoggedErrors()))
