def test_peerBind(self):
        filename = self.mktemp()
        peername = self.mktemp()
        serverFactory = MyServerFactory()
        connMade = serverFactory.protocolConnectionMade = defer.Deferred()
        unixPort = reactor.listenUNIX(filename, serverFactory)
        self.addCleanup(unixPort.stopListening)
        unixSocket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
        self.addCleanup(unixSocket.close)
        unixSocket.bind(peername)
        unixSocket.connect(filename)
        def cbConnMade(proto):
            expected = address.UNIXAddress(peername)
            self.assertEqual(serverFactory.peerAddresses, [expected])
            self.assertEqual(proto.transport.getPeer(), expected)
        connMade.addCallback(cbConnMade)
        return connMade
The address passed to the server factory's C{buildProtocol} method and
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/test/test_unix.py/UnixSocketTestCase.test_peerBind