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
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
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