def setUp(self):
        """
        Set up the server options and a fake for use by test cases.
        """
        self.config = twistd.ServerOptions()
        self.config.loadedPlugins = {'test_command': MockServiceMaker()}
        self.config.subOptions = object()
        self.config.subCommand = 'test_command'
        self.fakeKillArgs = [None, None]

        def fakeKill(pid, sig):
            """
            Fake method to capture arguments passed to os.kill.

            @param pid: The pid of the process being killed.

            @param sig: The signal sent to the process.
            """
            self.fakeKillArgs[0] = pid
            self.fakeKillArgs[1] = sig

        self.patch(os, 'kill', fakeKill)

        Set up the server options and a fake for use by test cases.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_twistd.py