def test_wrappedProtocolTransport(self):
        """
        Our transport is properly hooked up to the wrappedProtocol when a
        connection is made.
        """
        wf = endpoints._WrappingFactory(TestFactory())
        p = wf.buildProtocol(None)

        dummyTransport = object()

        p.makeConnection(dummyTransport)

        self.assertEqual(p.transport, dummyTransport)

        self.assertEqual(p._wrappedProtocol.transport, dummyTransport)

        Our transport is properly hooked up to the wrappedProtocol when a
        connection is made.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_endpoints.py