tests/test-hgweb-no-path-info
changeset 6945 2cfdabe235fb
parent 6796 943f066c0d58
child 8167 6c82beaaa11a
--- a/tests/test-hgweb-no-path-info	Fri Aug 29 16:50:11 2008 +0200
+++ b/tests/test-hgweb-no-path-info	Sat Aug 30 17:13:23 2008 +0200
@@ -41,19 +41,20 @@
 	'SERVER_PROTOCOL': 'HTTP/1.0'
 }
 
+def process(app):
+    content = app(env, startrsp)
+    sys.stdout.write(output.getvalue())
+    sys.stdout.write(''.join(content))
+    print '---- ERRORS'
+    print errors.getvalue()
+
 output = StringIO()
 env['QUERY_STRING'] = 'style=atom'
-hgweb('.', name = 'repo')(env, startrsp)
-print output.getvalue()
-print '---- ERRORS'
-print errors.getvalue()
+process(hgweb('.', name='repo'))
 
 output = StringIO()
 env['QUERY_STRING'] = 'style=raw'
-hgwebdir({'repo': '.'})(env, startrsp)
-print output.getvalue()
-print '---- ERRORS'
-print errors.getvalue()
+process(hgwebdir({'repo': '.'}))
 EOF
 
 python request.py | sed "s/http:\/\/127\.0\.0\.1:[0-9]*\//http:\/\/127.0.0.1\//"