def test_add_duration_event(self):
        """
        Test that only the correct MEDIA_EVENTS
        that have timestamps are added to the
        duration_events list
        """
        for key, events in self.events.items():
            stats = PBSVideoStats()
            for event in events:
                stats.add_event(event)

            results = stats.duration_events
            for edata in results:
                self.assertTrue(stats.MEDIA_EVENTS in edata.get('etype'))
                self.assertTrue(edata.get('edate') is not None)
dataset/ETHPy150Open pbs/agora-proc/tests/test_stats.py/PBSVideoStatsTestcase.test_add_duration_event/swapped operands of `in`