'Test comparison method __lt__ for events (by sorting them)'

def testComparison(self):

    data = [(8, (2012, 1, 12), (2013, 9, 19)), (2, None, (2013, 4, 21)), (6, (2013, 4, 14), (2013, 5, 7)), (3, (2012, 4, 21), (2013, 6, 3)), (4, (2013, 4, 18), (2013, 5, 27))]
    events = []
    for (event_id, start, end) in data:
        event_start = (tp_datetime(*start) if start else None)
        event_end = (tp_datetime(*end) if end else None)
        event = S3TimeSeriesEvent(event_id, start=event_start, end=event_end)
        events.append(event)
    order = [event.event_id for event in sorted(events)]
    self.assertEqual(order, [2, 8, 3, 6, 4])
