diff tests/test-hgweb-no-path-info.t @ 18646:c6a81e54c209

hgweb: make the test suite use hgweb in a more WSGI compliant way - as checked by wsgiref.validate. This makes sure that we don't optimize hgweb for invalid use cases.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 27 Jan 2013 03:32:09 +0100
parents f2719b387380
children d70703954a2a
line wrap: on
line diff
--- a/tests/test-hgweb-no-path-info.t	Sun Feb 10 18:24:29 2013 +0100
+++ b/tests/test-hgweb-no-path-info.t	Sun Jan 27 03:32:09 2013 +0100
@@ -39,6 +39,7 @@
   >     'wsgi.multiprocess': False,
   >     'wsgi.run_once': False,
   >     'REQUEST_METHOD': 'GET',
+  >     'PATH_INFO': '/',
   >     'SCRIPT_NAME': '',
   >     'SERVER_NAME': '127.0.0.1',
   >     'SERVER_PORT': os.environ['HGPORT'],
@@ -49,6 +50,7 @@
   >     content = app(env, startrsp)
   >     sys.stdout.write(output.getvalue())
   >     sys.stdout.write(''.join(content))
+  >     getattr(content, 'close', lambda : None)()
   >     print '---- ERRORS'
   >     print errors.getvalue()
   > 
@@ -101,7 +103,7 @@
   [('Content-Type', 'text/plain; charset=ascii')]
   ---- DATA
   
-  repo/
+  /repo/
   
   ---- ERRORS