def addSystemEventTrigger(self, phase, eventType, callable, *args, **kw):
        """
        Fake L{IReactorCore.run}.
        Keep track of trigger by appending it to
        self.triggers[phase][eventType].
        """
        phaseTriggers = self.triggers.setdefault(phase, {})
        eventTypeTriggers = phaseTriggers.setdefault(eventType, [])
        eventTypeTriggers.append((callable, args, kw))

        Fake L{IReactorCore.run}.
        Keep track of trigger by appending it to
        self.triggers[phase][eventType].
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/testing.py