def test_registerProducer(self):
        """
        L{policies.ProtocolWrapper.registerProducer} calls C{registerProducer}
        on the underlying transport.
        """
        wrapper = self._getWrapper()
        producer = object()
        wrapper.registerProducer(producer, True)
        self.assertIs(wrapper.transport.producer, producer)
        self.assertTrue(wrapper.transport.streaming)

        L{policies.ProtocolWrapper.registerProducer} calls C{registerProducer}
        on the underlying transport.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_policies.py