def test_validUNIXHeaderResolves_getPeerHost(self):
        """
        Test if UNIX headers result in the correct host and peer data.
        """
        factory = HAProxyWrappingFactory(Factory.forProtocol(StaticProtocol))
        proto = factory.buildProtocol(
            address.UNIXAddress(b'/home/test/sockets/server.sock'),
        )
        transport = StringTransportWithDisconnection()
        proto.makeConnection(transport)
        proto.dataReceived(self.UNIXHEADER)
        self.assertEqual(proto.getPeer().name, b'/home/tests/mysockets/sock')
        self.assertEqual(
            proto.wrappedProtocol.transport.getPeer().name,
            b'/home/tests/mysockets/sock',
        )
        self.assertEqual(proto.getHost().name, b'/home/tests/mysockets/sock')
        self.assertEqual(
            proto.wrappedProtocol.transport.getHost().name,
            b'/home/tests/mysockets/sock',
        )

        Test if UNIX headers result in the correct host and peer data.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/haproxy/test/test_wrapper.py