'If the request body producer indicates an error by firing the
L{Deferred} returned from its C{startProducing} method but then goes on
to write too many bytes, the L{Deferred} returned by {Request.writeTo}
fires with that L{Failure} and L{WrongBodyLength} is logged.'

def test_sendRequestBodyErroredEarlyThenTooManyBytes(self):

    def finisher(producer):
        producer.finished.errback(ArbitraryException())
    return self.assertFailure(self._sendRequestBodyFinishedEarlyThenTooManyBytes(finisher), ArbitraryException)
