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)