def _sendRequestBodyFinishedEarlyThenTooManyBytes(self, finisher):
        producer = StringProducer(3)
        request = Request('POST', '/bar', _boringHeaders, producer)
        writeDeferred = request.writeTo(self.transport)

        producer.consumer.write('ab')
        finisher(producer)
        self.assertIdentical(self.transport.producer, None)
        self.transport.clear()
        self.assertRaises(ExcessWrite, producer.consumer.write, 'cd')
        self.assertEqual(self.transport.value(), "")
        return writeDeferred
Verify that if the body producer fires its Deferred and then keeps
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/test/test_newclient.py/RequestTests._sendRequestBodyFinishedEarlyThenTooManyBytes