'The L{IProtocol} provider passed to L{Response.deliverBody} has its
C{makeConnection} method called with an L{IPushProducer} provider
hooked up to the response as an argument.'

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, u'paused')
    theProducer.resumeProducing()
    self.assertEqual(transport.producerState, u'producing')
