'L{renderElement} returns NOT_DONE_YET and eventually
writes the rendered L{Element} to the request before finishing the
request.'

def test_simpleRender(self):

    element = TestElement()
    d = self.request.notifyFinish()
    def check(_):
        self.assertEqual(''.join(self.request.written), '<!DOCTYPE    html>\n<p>Hello,    world.</p>')
        self.assertTrue(self.request.finished)
    d.addCallback(check)
    self.assertIdentical(NOT_DONE_YET, renderElement(self.request, element))
    return d
