tests/test-hgweb-no-path-info.t
changeset 33720 27fb986e54d0
parent 32940 75be14993fda
child 39659 19f701387ed5
equal deleted inserted replaced
33719:388901a15bfa 33720:27fb986e54d0
    29   > 
    29   > 
    30   > errors = stringio()
    30   > errors = stringio()
    31   > input = stringio()
    31   > input = stringio()
    32   > 
    32   > 
    33   > def startrsp(status, headers):
    33   > def startrsp(status, headers):
    34   >     print '---- STATUS'
    34   >     print('---- STATUS')
    35   >     print status
    35   >     print(status)
    36   >     print '---- HEADERS'
    36   >     print('---- HEADERS')
    37   >     print [i for i in headers if i[0] != 'ETag']
    37   >     print([i for i in headers if i[0] != 'ETag'])
    38   >     print '---- DATA'
    38   >     print('---- DATA')
    39   >     return output.write
    39   >     return output.write
    40   > 
    40   > 
    41   > env = {
    41   > env = {
    42   >     'wsgi.version': (1, 0),
    42   >     'wsgi.version': (1, 0),
    43   >     'wsgi.url_scheme': 'http',
    43   >     'wsgi.url_scheme': 'http',
    57   > def process(app):
    57   > def process(app):
    58   >     content = app(env, startrsp)
    58   >     content = app(env, startrsp)
    59   >     sys.stdout.write(output.getvalue())
    59   >     sys.stdout.write(output.getvalue())
    60   >     sys.stdout.write(''.join(content))
    60   >     sys.stdout.write(''.join(content))
    61   >     getattr(content, 'close', lambda : None)()
    61   >     getattr(content, 'close', lambda : None)()
    62   >     print '---- ERRORS'
    62   >     print('---- ERRORS')
    63   >     print errors.getvalue()
    63   >     print(errors.getvalue())
    64   > 
    64   > 
    65   > output = stringio()
    65   > output = stringio()
    66   > env['QUERY_STRING'] = 'style=atom'
    66   > env['QUERY_STRING'] = 'style=atom'
    67   > process(hgweb('.', name='repo'))
    67   > process(hgweb('.', name='repo'))
    68   > 
    68   >