From 274438a3b7a60f1512981182bbf4808b2a4986ac Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Tue, 16 May 2017 17:52:44 +0800 Subject: bugfix: /resources.json and /APIs cannot be accessed 1. change the join way of discover_url 2. limit tornado version not to use latest 4.5 Change-Id: I39dfd3b32bf232a7c144087bc9d5f88fb6798ee7 Signed-off-by: SerenaFeng --- testapi/opnfv_testapi/tornado_swagger/views.py | 6 ++---- testapi/requirements.txt | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'testapi') diff --git a/testapi/opnfv_testapi/tornado_swagger/views.py b/testapi/opnfv_testapi/tornado_swagger/views.py index ca4f01c..42b3748 100644 --- a/testapi/opnfv_testapi/tornado_swagger/views.py +++ b/testapi/opnfv_testapi/tornado_swagger/views.py @@ -8,7 +8,6 @@ ############################################################################## import inspect import json -import os.path import tornado.template import tornado.web @@ -32,9 +31,8 @@ class SwaggerUIHandler(tornado.web.RequestHandler): return self.static_path def get(self): - discovery_url = os.path.join( - self.base_url, - self.reverse_url(settings.RESOURCE_LISTING_NAME)) + resource_url = self.reverse_url(settings.RESOURCE_LISTING_NAME) + discovery_url = self.base_url + resource_url self.render('index.html', discovery_url=discovery_url) diff --git a/testapi/requirements.txt b/testapi/requirements.txt index e1fd9e4..ee144d2 100644 --- a/testapi/requirements.txt +++ b/testapi/requirements.txt @@ -4,6 +4,6 @@ pbr>=1.6 setuptools>=16.0 -tornado>=3.1 +tornado>=3.1,<=4.3 epydoc>=0.3.1 motor -- cgit 1.2.3-korg