tests/test-hgweb-non-interactive.t
changeset 40203 f80f7a67e176
parent 39918 8bd589aecf65
child 45056 4c1b4805db57
equal deleted inserted replaced
40202:56ea22fa55f0 40203:f80f7a67e176
    17   >     pycompat,
    17   >     pycompat,
    18   >     ui as uimod,
    18   >     ui as uimod,
    19   >     util,
    19   >     util,
    20   > )
    20   > )
    21   > ui = uimod.ui
    21   > ui = uimod.ui
    22   > from mercurial.hgweb.hgweb_mod import (
    22   > from mercurial.hgweb import hgweb_mod
    23   >     hgweb,
       
    24   > )
       
    25   > stringio = util.stringio
    23   > stringio = util.stringio
    26   > 
    24   > 
    27   > class FileLike(object):
    25   > class FileLike(object):
    28   >     def __init__(self, real):
    26   >     def __init__(self, real):
    29   >         self.real = real
    27   >         self.real = real
    65   >     'SERVER_NAME': '$LOCALIP',
    63   >     'SERVER_NAME': '$LOCALIP',
    66   >     'SERVER_PORT': os.environ['HGPORT'],
    64   >     'SERVER_PORT': os.environ['HGPORT'],
    67   >     'SERVER_PROTOCOL': 'HTTP/1.0'
    65   >     'SERVER_PROTOCOL': 'HTTP/1.0'
    68   > }
    66   > }
    69   > 
    67   > 
    70   > i = hgweb(b'.')
    68   > i = hgweb_mod.hgweb(b'.')
    71   > for c in i(env, startrsp):
    69   > for c in i(env, startrsp):
    72   >     pass
    70   >     pass
    73   > sys.stdout.flush()
    71   > sys.stdout.flush()
    74   > pycompat.stdout.write(b'---- ERRORS\n')
    72   > pycompat.stdout.write(b'---- ERRORS\n')
    75   > pycompat.stdout.write(b'%s\n' % errors.getvalue())
    73   > pycompat.stdout.write(b'%s\n' % errors.getvalue())