Ejemplo n.º 1
0
 def req(self, body, method):
     req = Request({'wsgi.url_scheme' : URL_SCHEME,
                    'wsgi.input' : StringIO(body),
                    'SERVER_NAME' : SERVER_NAME,
                    'SERVER_PORT' : SERVER_PORT})
     req.body = body
     req.method = method
     return req
Ejemplo n.º 2
0
 def reqWithPath(self, body, method, path):
     req = Request({'wsgi.url_scheme' : URL_SCHEME,
                    'wsgi.input' : StringIO(body),
                    'SERVER_NAME' : SERVER_NAME,
                    'SERVER_PORT' : SERVER_PORT,
                    'PATH_INFO' : path })
     req.body = body
     req.method = method
     return req
Ejemplo n.º 3
0
 def reqWithQuery(self, body, method, query_params):
     req = Request({'wsgi.url_scheme' : URL_SCHEME,
                    'wsgi.input' : StringIO(body),
                    'SERVER_NAME' : SERVER_NAME,
                    'SERVER_PORT' : SERVER_PORT,
                    'QUERY_STRING' : query_params })
     req.body = body
     req.method = method
     return req