def _test_observeWrites(self, what, count):
        with DummyFile() as fileHandle:
            observer = FileLogObserver(fileHandle, lambda e: what)
            event = dict(x=1)
            observer(event)
            self.assertEqual(fileHandle.writes, count)
Verify that observer performs an expected number of writes when the
dataset/ETHPy150Open twisted/twisted/twisted/logger/test/test_file.py/FileLogObserverTests._test_observeWrites