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_pod.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_pod.py')
-rw-r--r-- | result_collection_api/tests/unit/test_pod.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/result_collection_api/tests/unit/test_pod.py b/result_collection_api/tests/unit/test_pod.py index b6adc25..d7f4c3a 100644 --- a/result_collection_api/tests/unit/test_pod.py +++ b/result_collection_api/tests/unit/test_pod.py @@ -9,11 +9,12 @@ from common.constants import HTTP_OK, HTTP_BAD_REQUEST, \ class TestPodBase(TestBase): def setUp(self): super(TestPodBase, self).setUp() - self.req_d = PodCreateRequest('zte-1', 'virtual', 'zte pod 1','ci-pod') + self.req_d = PodCreateRequest('zte-1', 'virtual', + 'zte pod 1', 'ci-pod') self.req_e = PodCreateRequest('zte-2', 'metal', 'zte pod 2') self.get_res = Pod self.list_res = Pods - self.basePath = '/pods' + self.basePath = '/api/v1/pods' def assert_get_body(self, pod, req=None): if not req: @@ -21,7 +22,7 @@ class TestPodBase(TestBase): self.assertEqual(pod.name, req.name) self.assertEqual(pod.mode, req.mode) self.assertEqual(pod.details, req.details) - self.assertEqual(pod.role, req.role) + self.assertEqual(pod.role, req.role) self.assertIsNotNone(pod.creation_date) self.assertIsNotNone(pod._id) @@ -42,11 +43,6 @@ class TestPodCreate(TestPodBase): self.assertEqual(code, HTTP_FORBIDDEN) self.assertIn('already exists', body) - def _assertMeta(self, meta, success): - self.assertEqual(meta.success, success) - if success: - self.assertEqual(meta.uri, '/pods/{}'.format(self.req_d.name)) - class TestPodGet(TestPodBase): def test_notExist(self): |