def test_get_all_subsequent_events__simple(self):
     """Verify behavior of _get_all_subsequent_events.
     """
     timeline = Timeline()
     timeline._subsequent_events = {'one': set(['two']),
                                   'two': set(['three']),
                                   'three': set(['four']),
                                   'four': set()}
     subsequent_events = timeline._get_all_subsequent_events('one')
     self.assertEqual(set(['two', 'three', 'four']), subsequent_events)
 def test_get_all_subsequent_events__branching(self):
     """Verify behavior of _get_all_subsequent_events when events overlap.
     """
     timeline = Timeline()
     timeline._subsequent_events = {'one': set(['two']),
                                    'two': set(['three']),
                                    'three': set(['six', 'four']),
                                    'four': set(['five']),
                                    'five': set(['six']),
                                    'six': set(['seven']),
                                    'seven': set()}
     subsequent_events = timeline._get_all_subsequent_events('one')
     self.assertEqual(set(['two', 'three', 'four', 'five', 'six', 'seven']), subsequent_events)