def setUp(self):
        """
        Replace the __main__ module with a fake one, so that it can be mutated
        in tests
        """
        self.realMain = sys.modules['__main__']
        self.fakeMain = sys.modules['__main__'] = FakeModule()

        Replace the __main__ module with a fake one, so that it can be mutated
        in tests
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_sob.py