'If there is a request producer registered with L{HTTPChannel}, calling
C{stopProducing} causes that producer to be stopped as well.'

def test_HTTPChannelStopRequestProducer(self):

    (channel, transport) = self.buildChannelAndTransport(StringTransport(), DelayedHTTPHandler)
    channel.dataReceived(self.request)
    request = channel.requests[0].original
    producer = DummyProducer()
    request.registerProducer(producer, True)
    self.assertEqual(producer.events, [])
    channel.stopProducing()
    self.assertEqual(producer.events, ['stop'])
