'Data written by a L{FileLogObserver} returned by L{jsonFileLogObserver}
and read by L{eventsFromJSONLogFile} is reconstructed properly.'

def test_roundTrip(self):

    event = dict(x=1)
    with StringIO() as fileHandle:
        observer = jsonFileLogObserver(fileHandle)
        observer(event)
        fileHandle.seek(0)
        events = eventsFromJSONLogFile(fileHandle)
        self.assertEqual(tuple(events), (event,))
        self.assertEqual(len(self.errorEvents), 0)
