diff options
author | Serena Feng <feng.xiaowei@zte.com.cn> | 2017-08-18 00:59:57 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-08-18 00:59:57 +0000 |
commit | b6d124999387d3a1b86ba046a89f6e96863a9b55 (patch) | |
tree | 16f9c956ce1ab3ec6c88a426b94e30025721ae43 /utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py | |
parent | fb0271be568c4737f6ce6fa9d222ccee26c096ee (diff) | |
parent | 1fce3258fae5cf6a99af93b6ea026fec4d839cd6 (diff) |
Merge "impl update trust_indicator in scenario"
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py')
-rw-r--r-- | utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py index c12c52ba9..0558ea30d 100644 --- a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py +++ b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py @@ -189,6 +189,17 @@ class TestScenarioUpdate(TestScenarioBase): return add, scenario + @update_partial('_add', '_success') + def test_addTrustIndicator(self, scenario): + add = models.ScenarioTI(date=str(datetime.now()), status='gold') + projects = scenario['installers'][0]['versions'][0]['projects'] + functest = filter(lambda f: f['project'] == 'functest', projects)[0] + functest['trust_indicators'].append(add.format()) + self.update_url = '{}/trust_indicators?{}'.format(self.scenario_url, + self.locate_project) + + return add, scenario + def _add(self, update_req, new_scenario): return self.post_direct_url(self.update_url, update_req) |