def test_makeConnection(self):
        producers = []
        transport = StringTransport()
        class SomeProtocol(Protocol):
            def makeConnection(self, producer):
                producers.append(producer)

        consumer = SomeProtocol()
        response = justTransportResponse(transport)
        response.deliverBody(consumer)
        [theProducer] = producers
        theProducer.pauseProducing()
        self.assertEqual(transport.producerState, 'paused')
        theProducer.resumeProducing()
        self.assertEqual(transport.producerState, 'producing')
The L{IProtocol} provider passed to L{Response.deliverBody} has its
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/test/test_newclient.py/ResponseTests.test_makeConnection