diff options
author | thuva4 <tharma.thuva@gmail.com> | 2018-02-11 15:07:37 +0530 |
---|---|---|
committer | thuva4 <tharma.thuva@gmail.com> | 2018-02-15 17:37:04 +0530 |
commit | 89e8f8355372a9c377ae887c855bd6c752aad2e1 (patch) | |
tree | 6f903e54f6f25922d6886ab23b648f7f87ca3bc0 /testapi/opnfv_testapi/tests/unit | |
parent | 86f8a2036521e9401d8c9431e4b6412878e6d94f (diff) |
Add test for deploy result get one
Cover the deploy result get one function & not found in
unit test
JIRA: RELENG-345
Change-Id: I45e9c9c4feacc73d2c934031656ac063be42a148
Signed-off-by: thuva4 <tharma.thuva@gmail.com>
Diffstat (limited to 'testapi/opnfv_testapi/tests/unit')
-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)) |