equal
deleted
inserted
replaced
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', |
56 > def process(app): |
56 > def process(app): |
57 > content = app(env, startrsp) |
57 > content = app(env, startrsp) |
58 > sys.stdout.write(output.getvalue()) |
58 > sys.stdout.write(output.getvalue()) |
59 > sys.stdout.write(''.join(content)) |
59 > sys.stdout.write(''.join(content)) |
60 > getattr(content, 'close', lambda : None)() |
60 > getattr(content, 'close', lambda : None)() |
61 > print '---- ERRORS' |
61 > print('---- ERRORS') |
62 > print errors.getvalue() |
62 > print(errors.getvalue()) |
63 > |
63 > |
64 > output = stringio() |
64 > output = stringio() |
65 > env['PATH_INFO'] = '/' |
65 > env['PATH_INFO'] = '/' |
66 > env['QUERY_STRING'] = 'style=atom' |
66 > env['QUERY_STRING'] = 'style=atom' |
67 > process(hgweb('.', name = 'repo')) |
67 > process(hgweb('.', name = 'repo')) |