def test_protocolFactoryAttribute(self):
        """
        Make sure protocol.factory is the wrapped factory, not the wrapping
        factory.
        """
        f = Server()
        wf = policies.WrappingFactory(f)
        p = wf.buildProtocol(address.IPv4Address('TCP', '127.0.0.1', 35))
        self.assertIs(p.wrappedProtocol.factory, f)

        Make sure protocol.factory is the wrapped factory, not the wrapping
        factory.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_policies.py