def test_message(self):
        """
        A published old-style event should format as text in the same way as
        the given C{textFromEventDict} callable would format it.
        """
        def textFromEventDict(event):
            return "".join(reversed(" ".join(event["message"])))

        event = self.legacyEvent("Hello,", "world!")
        text = textFromEventDict(event)

        publishToNewObserver(self.observer, event, textFromEventDict)
        self.assertEqual(formatEvent(self.events[0]), text)

        A published old-style event should format as text in the same way as
        the given C{textFromEventDict} callable would format it.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/logger/test/test_legacy.py