def test_observeWrites(self):
        with StringIO() as fileHandle:
            observer = FileLogObserver(fileHandle, lambda e: unicode(e))
            event = dict(x=1)
            observer(event)
            self.assertEqual(fileHandle.getvalue(), unicode(event))
L{FileLogObserver} writes to the given file when it observes events.
dataset/ETHPy150Open twisted/twisted/twisted/logger/test/test_file.py/FileLogObserverTests.test_observeWrites