diff options
author | 2016-05-25 22:56:11 +0800 | |
---|---|---|
committer | 2016-05-26 14:18:08 +0800 | |
commit | e6b2ed1749f5daad7a15a878df301e017a15d832 (patch) | |
tree | 9ff6949f543269c06c0d7828f6a50a1b3b6ac807 /result_collection_api/tests/unit/test_result.py | |
parent | f204fed9d8519f994b085a1139f036bc40fcddbc (diff) |
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 <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'result_collection_api/tests/unit/test_result.py')
-rw-r--r-- | result_collection_api/tests/unit/test_result.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/result_collection_api/tests/unit/test_result.py b/result_collection_api/tests/unit/test_result.py index 2ea1b6c..40b7dac 100644 --- a/result_collection_api/tests/unit/test_result.py +++ b/result_collection_api/tests/unit/test_result.py @@ -64,15 +64,17 @@ class TestResultBase(TestBase): trust_indicator=self.trust_indicator) self.get_res = TestResult self.list_res = TestResults - self.basePath = '/results' + self.basePath = '/api/v1/results' self.req_pod = PodCreateRequest(self.pod, 'metal', 'zte pod 1') self.req_project = ProjectCreateRequest(self.project, 'vping test') self.req_testcase = TestcaseCreateRequest('/cases/vping', self.case, 'vping-ssh test') - self.create_help('/pods', self.req_pod) - self.create_help('/projects', self.req_project) - self.create_help('/projects/%s/cases', self.req_testcase, self.project) + self.create_help('/api/v1/pods', self.req_pod) + self.create_help('/api/v1/projects', self.req_project) + self.create_help('/api/v1/projects/%s/cases', + self.req_testcase, + self.project) def assert_res(self, code, result): self.assertEqual(code, HTTP_OK) |