diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2017-08-16 15:38:23 +0800 |
---|---|---|
committer | SerenaFeng <feng.xiaowei@zte.com.cn> | 2017-08-17 14:42:07 +0800 |
commit | 017153393c1055608d33dd3169b02469e29191b7 (patch) | |
tree | 4cf6cd0ffd0a5d2bcca9aaa2c15fd12cee70fea8 /testapi/opnfv_testapi/tests | |
parent | 015ee1e72119dbc884cecbaf6149922850df7223 (diff) |
impl update trust_indicator in scenario
Change-Id: I1afe38412926778bc84d178dbbfc3fe0cde15f69
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi/opnfv_testapi/tests')
-rw-r--r-- | testapi/opnfv_testapi/tests/unit/resources/test_scenario.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py b/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py index c12c52b..0558ea3 100644 --- a/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py +++ b/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) |