'If the request body producer with an unknown length tries to write
after firing the L{Deferred} returned by its C{startProducing} method,
the C{write} call raises an exception and does not write anything to
the underlying transport.'

def test_sendChunkedRequestBodyFinishedThenWriteMore(self, _with=None):

    producer = StringProducer(UNKNOWN_LENGTH)
    request = Request('POST', '/bar', _boringHeaders, producer)
    writeDeferred = request.writeTo(self.transport)
    producer.finished.callback(_with)
    self.transport.clear()
    self.assertRaises(ExcessWrite, producer.consumer.write, 'foo')
    self.assertEqual(self.transport.value(), '')
    return writeDeferred
