def test_mockSetUidInParent(self):
        """
        When spawning a child process with a UID different from the UID of the
        current process, the current process does not have its UID changed.
        """
        self.mockos.child = False
        cmd = b'/mock/ouch'

        d = defer.Deferred()
        p = TrivialProcessProtocol(d)
        reactor.spawnProcess(p, cmd, [b'ouch'], env=None,
                             usePTY=False, uid=8080)
        self.assertEqual(self.mockos.actions, [('fork', False), 'waitpid'])

        When spawning a child process with a UID different from the UID of the
        current process, the current process does not have its UID changed.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_process.py