'L{FileLogObserver} writes to the given file when it observes events.'

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))
