'If the L{HTTPChannel} has a L{IPullProducer} registered with it it can
adapt that producer into an L{IPushProducer}.'

def test_HTTPChannelToleratesPullProducers(self):

    (channel, transport) = self.buildChannelAndTransport(StringTransport(), DummyPullProducerHandler)
    transport = StringTransport()
    channel = http.HTTPChannel()
    channel.requestFactory = DummyPullProducerHandlerProxy
    channel.makeConnection(transport)
    channel.dataReceived(self.request)
    request = channel.requests[0].original
    responseComplete = request._actualProducer.result
    def validate(ign):
        responseBody = transport.value().split('\r\n\r\n', 1)[1]
        expectedResponseBody = '1\r\n0\r\n1\r\n1\r\n1\r\n2\r\n1\r\n3\r\n1\r\n4\r\n1\r\n5\r\n1\r\n6\r\n1\r\n7\r\n1\r\n8\r\n1\r\n9\r\n'
        self.assertEqual(responseBody, expectedResponseBody)
    return responseComplete.addCallback(validate)
