def test_earliest_time(self):
        """
        Test that we're correctly calculating
        the time of the first event of a stream
        """
        for key, events in self.events.items():
            stats = PBSVideoStats()
            earliest_time = None
            for event in events:
                stats.add_event(event)
                if earliest_time < event.get('event_date'):
                    earliest_time = event.get('event_date')
            results = stats.summary()
            self.assertEqual(results.get('earliest'), earliest_time)
dataset/ETHPy150Open pbs/agora-proc/tests/test_stats.py/PBSVideoStatsTestcase.test_earliest_time/swapped operands of `<`