'Test that L{eventsFromJSONLogFile} reads two pre-defined events from a
file: C{{u"x": 1}} and C{{u"y": 2}}.
@param fileHandle: The file to read from.
@param kwargs: Keyword arguments to pass to L{eventsFromJSONLogFile}.'

def _readEvents(self, fileHandle, **kwargs):

    events = eventsFromJSONLogFile(fileHandle, **kwargs)
    self.assertEqual(next(events), {u'x': 1})
    self.assertEqual(next(events), {u'y': 2})
    self.assertRaises(StopIteration, next, events)
