def test_sendRequestBodyWithTooFewBytes(self):
        producer = StringProducer(3)
        request = Request('POST', '/bar', _boringHeaders, producer)
        writeDeferred = request.writeTo(self.transport)
        producer.consumer.write('ab')
        producer.finished.callback(None)
        self.assertIdentical(self.transport.producer, None)
        return self.assertFailure(writeDeferred, WrongBodyLength)
If L{Request} is created with a C{bodyProducer} with a known length and
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/test/test_newclient.py/RequestTests.test_sendRequestBodyWithTooFewBytes