def test_should_merge_events_with_same_id(self):
        irrelevant_attributes = {"result": "OK", "workflow": 2, "task_id": 123, "vm": 32}

        events = [
            parse_experiment_log.TaskLog(started=1000, finished=None, id=1, **irrelevant_attributes),
            parse_experiment_log.TaskLog(started=None, finished=2000, id=1, **irrelevant_attributes),
        ]

        expected_events = [parse_experiment_log.TaskLog(id=1, started=1000, finished=2000, **irrelevant_attributes)]

        joined_events = parse_experiment_log.glue_fissured_events(events)

        self.assertEqual(set(expected_events), set(joined_events))
    def test_should_return_empty_list_when_no_events_given(self):
        events = []

        joined_events = parse_experiment_log.glue_fissured_events(events)

        self.assertListEqual([], joined_events)