tests/test-hgweb-no-path-info.t
changeset 12743 4c4aeaab2339
parent 12643 d08bb64888bc
child 13956 ffb5c09ba822
equal deleted inserted replaced
12742:6ab4a7d3c179 12743:4c4aeaab2339
    22   > 
    22   > 
    23   > errors = StringIO()
    23   > errors = StringIO()
    24   > input = StringIO()
    24   > input = StringIO()
    25   > 
    25   > 
    26   > def startrsp(status, headers):
    26   > def startrsp(status, headers):
    27   > 	print '---- STATUS'
    27   >     print '---- STATUS'
    28   > 	print status
    28   >     print status
    29   > 	print '---- HEADERS'
    29   >     print '---- HEADERS'
    30   > 	print [i for i in headers if i[0] != 'ETag']
    30   >     print [i for i in headers if i[0] != 'ETag']
    31   > 	print '---- DATA'
    31   >     print '---- DATA'
    32   > 	return output.write
    32   >     return output.write
    33   > 
    33   > 
    34   > env = {
    34   > env = {
    35   > 	'wsgi.version': (1, 0),
    35   >     'wsgi.version': (1, 0),
    36   > 	'wsgi.url_scheme': 'http',
    36   >     'wsgi.url_scheme': 'http',
    37   > 	'wsgi.errors': errors,
    37   >     'wsgi.errors': errors,
    38   > 	'wsgi.input': input,
    38   >     'wsgi.input': input,
    39   > 	'wsgi.multithread': False,
    39   >     'wsgi.multithread': False,
    40   > 	'wsgi.multiprocess': False,
    40   >     'wsgi.multiprocess': False,
    41   > 	'wsgi.run_once': False,
    41   >     'wsgi.run_once': False,
    42   > 	'REQUEST_METHOD': 'GET',
    42   >     'REQUEST_METHOD': 'GET',
    43   > 	'SCRIPT_NAME': '',
    43   >     'SCRIPT_NAME': '',
    44   > 	'SERVER_NAME': '127.0.0.1',
    44   >     'SERVER_NAME': '127.0.0.1',
    45   > 	'SERVER_PORT': os.environ['HGPORT'],
    45   >     'SERVER_PORT': os.environ['HGPORT'],
    46   > 	'SERVER_PROTOCOL': 'HTTP/1.0'
    46   >     'SERVER_PROTOCOL': 'HTTP/1.0'
    47   > }
    47   > }
    48   > 
    48   > 
    49   > def process(app):
    49   > def process(app):
    50   >     content = app(env, startrsp)
    50   >     content = app(env, startrsp)
    51   >     sys.stdout.write(output.getvalue())
    51   >     sys.stdout.write(output.getvalue())