def test_eventWithTraceback(self):
        """
        An event with a C{log_failure} key will have a traceback appended.
        """
        try:
            raise CapturedError("This is a fake error")
        except CapturedError:
            f = Failure()

        event = {
            "log_format": u"This is a test log message"
        }
        event["log_failure"] = f
        eventText = eventAsText(
            event,
            includeTimestamp=True,
            includeSystem=False
        )
        self.assertIn(unicode(f.getTraceback()), eventText)
        self.assertIn(u'This is a test log message', eventText)

        An event with a C{log_failure} key will have a traceback appended.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/logger/test/test_format.py