def test_registerProducerWithTransport(self):
        """
        L{H2Connection} can be registered with the transport as a producer.
        """
        b = StringTransport()
        a = H2Connection()
        a.requestFactory = DummyHTTPHandlerProxy

        b.registerProducer(a, True)
        self.assertTrue(b.producer is a)

        L{H2Connection} can be registered with the transport as a producer.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_http2.py