From e6b2ed1749f5daad7a15a878df301e017a15d832 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Wed, 25 May 2016 22:56:11 +0800 Subject: attach version number to url in testAPI version - /versions api - /api/v1/pods(projects/results) dashboard - /dashboard/v1/results I tried to make the code smart, but in vain, sad...... JIRA: FUNCTEST-261 Change-Id: I3e9e3ad7180a6c6349fd743e24eafea07bdefd1d Signed-off-by: SerenaFeng --- result_collection_api/tests/unit/test_base.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'result_collection_api/tests/unit/test_base.py') diff --git a/result_collection_api/tests/unit/test_base.py b/result_collection_api/tests/unit/test_base.py index a06cba9..99b1de2 100644 --- a/result_collection_api/tests/unit/test_base.py +++ b/result_collection_api/tests/unit/test_base.py @@ -25,19 +25,18 @@ class TestBase(AsyncHTTPTestCase): def get_app(self): return Application( [ - (r"/version", VersionHandler), - (r"/pods", PodHandler), - (r"/pods/([^/]+)", PodHandler), - (r"/projects", ProjectHandler), - (r"/projects/([^/]+)", ProjectHandler), - (r"/projects/([^/]+)/cases", TestcaseHandler), - (r"/projects/([^/]+)/cases/([^/]+)", TestcaseHandler), - (r"/results", TestResultsHandler), - (r"/results([^/]*)", TestResultsHandler), - (r"/results/([^/]*)", TestResultsHandler), - (r"/dashboard", DashboardHandler), - (r"/dashboard([^/]*)", DashboardHandler), - (r"/dashboard/([^/]*)", DashboardHandler), + (r"/versions", VersionHandler), + (r"/api/v1/pods", PodHandler), + (r"/api/v1/pods/([^/]+)", PodHandler), + (r"/api/v1/projects", ProjectHandler), + (r"/api/v1/projects/([^/]+)", ProjectHandler), + (r"/api/v1/projects/([^/]+)/cases", TestcaseHandler), + (r"/api/v1/projects/([^/]+)/cases/([^/]+)", TestcaseHandler), + (r"/api/v1/results", TestResultsHandler), + (r"/api/v1/results([^/]*)", TestResultsHandler), + (r"/api/v1/results/([^/]*)", TestResultsHandler), + (r"/dashboard/v1/results", DashboardHandler), + (r"/dashboard/v1/results([^/]*)", DashboardHandler), ], db=fake_pymongo, debug=True, -- cgit 1.2.3-korg