コード例 #1
0
ファイル: utils.py プロジェクト: zopefoundation/ZServer
def makerequest(app, stdout=sys.stdout):
    '''Wraps the app into a fresh REQUEST.'''
    from Testing.makerequest import makerequest as _makerequest
    environ = {}
    environ['SERVER_NAME'] = _Z2HOST or 'nohost'
    environ['SERVER_PORT'] = '%d' % (_Z2PORT or 80)
    environ['REQUEST_METHOD'] = 'GET'
    return _makerequest(app, stdout=stdout, environ=environ)
コード例 #2
0
def makerequest(app, stdout=sys.stdout):
    '''Wraps the app into a fresh REQUEST.'''
    from Testing.makerequest import makerequest as _makerequest
    environ = {}
    environ['SERVER_NAME'] = _Z2HOST or 'nohost'
    environ['SERVER_PORT'] = '%d' % (_Z2PORT or 80)
    environ['REQUEST_METHOD'] = 'GET'
    return _makerequest(app, stdout=stdout, environ=environ)