def stop(self):
        """
        Fake L{IReactorCore.run}.
        Sets C{self.running} to L{False}.
        Sets C{self.hasStopped} to L{True}.
        """
        self.running = False
        self.hasStopped = True

        Fake L{IReactorCore.run}.
        Sets C{self.running} to L{False}.
        Sets C{self.hasStopped} to L{True}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/testing.py