def consume(app, path): request = app.request(webob.Request.blank(path).environ) return traject_consume(app, request), request
def consume(mount, path, parameters=None): if parameters: path += '?' + urlencode(parameters, True) request = mount.request(webob.Request.blank(path).environ) return traject_consume(mount, request), request