def setUp(self): self.s = kbservices.kbservices() self.service='transform' self.bad_service='Bogus'
redirect_path = redirect_parsed.path if redirect_parsed.query: redirect_path += "?" + redirect_parsed.query munged_path = url_for(".router_request", host=redirect_host, file=redirect_path[1:]) url = "%s://%s%s" % (parsed.scheme, parsed.netloc, munged_path) response_headers["location"] = url # Rewrite URLs in the content to point to our URL schemt.method == " instead. # Ugly, but seems to mostly work. #root = url_for(".router_request") contents = resp.read() flask_response = Response(response=contents, status=resp.status, headers=response_headers, content_type=resp.getheader('content-type')) return flask_response app.config.update(dict(DEBUG=DEBUG_FLAG)) services = kbservices.kbservices() app.register_blueprint(router) if __name__ == '__main__': app.run(debug=DEBUG_FLAG, host='0.0.0.0', port=LISTEN_PORT, threaded=True)
def setUp(self): self.s = kbservices.kbservices() self.service = 'transform' self.bad_service = 'Bogus'
redirect_path = redirect_parsed.path if redirect_parsed.query: redirect_path += "?" + redirect_parsed.query munged_path = url_for(".router_request", host=redirect_host, file=redirect_path[1:]) url = "%s://%s%s" % (parsed.scheme, parsed.netloc, munged_path) response_headers["location"] = url # Rewrite URLs in the content to point to our URL schemt.method == " instead. # Ugly, but seems to mostly work. #root = url_for(".router_request") contents = resp.read() flask_response = Response(response=contents, status=resp.status, headers=response_headers, content_type=resp.getheader('content-type')) return flask_response app.config.update(dict(DEBUG=DEBUG_FLAG)) services=kbservices.kbservices() app.register_blueprint(router) if __name__ == '__main__': app.run(debug=DEBUG_FLAG, host='0.0.0.0', port=LISTEN_PORT, threaded=True)