예제 #1
0
 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))
예제 #2
0
 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)