diff options
author | Serena Feng <feng.xiaowei@zte.com.cn> | 2018-02-24 03:31:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-02-24 03:31:13 +0000 |
commit | e9285f3bb3f71840958e8967ba6409dc9b2d038a (patch) | |
tree | 6c94aed1647ad4264fd27e8c0d0df26ebbdf2dbd /testapi | |
parent | 6eebbd311a6b2640106cdf05e0952f0c458161f9 (diff) | |
parent | 89e8f8355372a9c377ae887c855bd6c752aad2e1 (diff) |
Merge "Add test for deploy result get one"
Diffstat (limited to 'testapi')
-rw-r--r-- | testapi/opnfv_testapi/tests/unit/handlers/test_deploy_result.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testapi/opnfv_testapi/tests/unit/handlers/test_deploy_result.py b/testapi/opnfv_testapi/tests/unit/handlers/test_deploy_result.py index 65e765e..8f2ca76 100644 --- a/testapi/opnfv_testapi/tests/unit/handlers/test_deploy_result.py +++ b/testapi/opnfv_testapi/tests/unit/handlers/test_deploy_result.py @@ -92,6 +92,10 @@ class DeployResultGet(DeployResultBase): self.req_d_id = self._create_d() self.req_10d_later = self._create_changed_date(days=10) + @executor.get(httplib.OK, 'assert_res') + def test_getOne(self): + return self.req_d_id + @executor.query(httplib.OK, '_query_success', 3) def test_queryInstaller(self): return self._set_query('installer') @@ -165,6 +169,19 @@ class DeployResultGet(DeployResultBase): self._create_error_start_date('') return self._set_query(period=5) + @executor.query(httplib.OK, '_query_success', 0) + def test_notFound(self): + return self._set_query('installer', + 'version', + 'job_name', + 'build_id', + 'scenario', + 'upstream_job_name', + 'upstream_build_id', + 'criteria', + pod='notExistPod', + period=1) + def _query_success(self, body, number): self.assertEqual(number, len(body.deployresults)) |