def init(self, path, host): environ = webob.Request.blank(path).environ environ['HTTP_HOST'] = host request = webapp.Request(environ) response = webapp.Response() self.handler = utils.BaseHandler(request, response, main.setup_env(request))
def handler_for_url(self, url): request = webapp.Request(webapp.Request.blank(url).environ) response = webapp.Response() handler = utils.BaseHandler(request, response, main.setup_env(request)) return (request, response, handler)