summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/opnfv_testapi/tests
diff options
context:
space:
mode:
Diffstat (limited to 'utils/test/result_collection_api/opnfv_testapi/tests')
-rw-r--r--utils/test/result_collection_api/opnfv_testapi/tests/unit/test_base.py24
-rw-r--r--utils/test/result_collection_api/opnfv_testapi/tests/unit/test_result.py3
2 files changed, 4 insertions, 23 deletions
diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_base.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_base.py
index 8f0c28488..01c43f0f7 100644
--- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_base.py
+++ b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_base.py
@@ -3,15 +3,7 @@ import json
from tornado.web import Application
from tornado.testing import AsyncHTTPTestCase
-from opnfv_testapi.resources.pod_handlers import PodCLHandler, PodGURHandler
-from opnfv_testapi.resources.project_handlers import ProjectCLHandler, \
- ProjectGURHandler
-from opnfv_testapi.resources.handlers import VersionHandler
-from opnfv_testapi.resources.testcase_handlers import TestcaseCLHandler, \
- TestcaseGURHandler
-from opnfv_testapi.resources.result_handlers import ResultsCLHandler, \
- ResultsGURHandler
-from opnfv_testapi.resources.dashboard_handlers import DashboardHandler
+from opnfv_testapi.router import url_mappings
from opnfv_testapi.resources.models import CreateResponse
import fake_pymongo
@@ -32,19 +24,7 @@ class TestBase(AsyncHTTPTestCase):
def get_app(self):
return Application(
- [
- (r"/versions", VersionHandler),
- (r"/api/v1/pods", PodCLHandler),
- (r"/api/v1/pods/([^/]+)", PodGURHandler),
- (r"/api/v1/projects", ProjectCLHandler),
- (r"/api/v1/projects/([^/]+)", ProjectGURHandler),
- (r"/api/v1/projects/([^/]+)/cases", TestcaseCLHandler),
- (r"/api/v1/projects/([^/]+)/cases/([^/]+)",
- TestcaseGURHandler),
- (r"/api/v1/results", ResultsCLHandler),
- (r"/api/v1/results/([^/]+)", ResultsGURHandler),
- (r"/dashboard/v1/results", DashboardHandler),
- ],
+ url_mappings.mappings,
db=fake_pymongo,
debug=True,
)
diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_result.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_result.py
index 5e424f8f0..23a745fe0 100644
--- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_result.py
+++ b/utils/test/result_collection_api/opnfv_testapi/tests/unit/test_result.py
@@ -7,7 +7,8 @@ from opnfv_testapi.resources.project_models import ProjectCreateRequest
from opnfv_testapi.resources.testcase_models import TestcaseCreateRequest
from opnfv_testapi.resources.result_models import ResultCreateRequest, \
TestResult, TestResults
-from opnfv_testapi.common.constants import HTTP_OK, HTTP_BAD_REQUEST, HTTP_NOT_FOUND
+from opnfv_testapi.common.constants import HTTP_OK, HTTP_BAD_REQUEST, \
+ HTTP_NOT_FOUND
__author__ = '__serena__'