def _modeTest(self, methodName, path, factory):
        """
        Assert that the mode of the created unix socket is set to the mode
        specified to the reactor method.
        """
        mode = 0o600
        reactor = self.buildReactor()
        unixPort = getattr(reactor, methodName)(path, factory, mode=mode)
        unixPort.stopListening()
        self.assertEqual(S_IMODE(stat(path).st_mode), mode)

        Assert that the mode of the created unix socket is set to the mode
        specified to the reactor method.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_unix.py