def test_ServerAddressUNIX(self):
        """
        Helper method to test UNIX server addresses.
        """

        def connected(protocols):
            client, server, port = protocols
            try:
                portPath = _coerceToFilesystemEncoding('', port.getHost().name)
                self.assertEqual(
                    "<AccumulatingProtocol #%s on %s>" %
                        (server.transport.sessionno, portPath),
                    str(server.transport))

                self.assertEqual(
                    "AccumulatingProtocol,%s,%s" %
                        (server.transport.sessionno, portPath),
                    server.transport.logstr)

                peerAddress = server.factory.peerAddresses[0]
                self.assertIsInstance(peerAddress, UNIXAddress)
            finally:
                # Be certain to drop the connection so the test completes.
                server.transport.loseConnection()

        reactor = self.buildReactor()
        d = self.getConnectedClientAndServer(reactor, interface=None, addressFamily=None)
        d.addCallback(connected)
        self.runReactor(reactor)

        Helper method to test UNIX server addresses.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_unix.py