def test_shedPrivileges(self):
        """
        L{UnixApplicationRunner.shedPrivileges} switches the user ID
        of the process.
        """
        def switchUIDPass(uid, gid, euid):
            self.assertEqual(uid, 200)
            self.assertEqual(gid, 54)
            self.assertEqual(euid, 35)

        self.patch(_twistd_unix, 'switchUID', switchUIDPass)
        runner = UnixApplicationRunner({})
        runner.shedPrivileges(35, 200, 54)

        L{UnixApplicationRunner.shedPrivileges} switches the user ID
        of the process.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_twistd.py