summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py
diff options
context:
space:
mode:
Diffstat (limited to 'testapi/opnfv_testapi/tests/unit/resources/test_scenario.py')
-rw-r--r--testapi/opnfv_testapi/tests/unit/resources/test_scenario.py11
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)