def test_brokenStopProducing(self):
        producer = StringProducer(3)
        def brokenStopProducing():
            raise ArbitraryException(u"stopProducing is busted")
        producer.stopProducing = brokenStopProducing

        request = Request(b'GET', b'/', _boringHeaders, producer)
        request.writeTo(self.transport)
        request.stopWriting()
        self.assertEqual(
            len(self.flushLoggedErrors(ArbitraryException)), 1)
If the body producer's C{stopProducing} method raises an exception,
dataset/ETHPy150Open twisted/twisted/twisted/web/test/test_newclient.py/RequestTests.test_brokenStopProducing