The comments application allows us to comment on pages from another application. First we make an application:: >>> from testrunner import send_request >>> from simpleapp import simple_app Then we wrap the comment application around that:: >>> from comments import Comments >>> wrapped_app = Comments(simple_app) When we get pages from the application, we'll see the comment form at the bottom:: >>> print send_request(wrapped_app, '/') 200 OK Content-Type: text/html Simple App

Simple App!

Comment:

Now we can POST a request to that form:: >>> print send_request(wrapped_app, '/_comment/', method='POST', ... body={'path_info': '/', 'comment': 'hi'}) 302 Found Content-Type: ... Location: / ... We'll get back a redirect, which will lead us back to the original page with our comment added:: >>> print send_request(wrapped_app, '/') 200 OK Content-Type: text/html ...
hi