'Calling L{Request.write} after L{Request.finish} has been called results
in a L{RuntimeError} being raised.'

def test_writeAfterFinish(self):

    request = http.Request(DummyChannel(), False)
    finished = request.notifyFinish()
    request.gotLength(1)
    request.write('foobar')
    request.finish()
    self.assertRaises(RuntimeError, request.write, 'foobar')
    return finished
