diff options
author | Serena Feng <feng.xiaowei@zte.com.cn> | 2017-08-28 10:00:47 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-08-28 10:00:47 +0000 |
commit | 09a7b5a431e2f972af350205fc029919bc96195d (patch) | |
tree | b0ac5c016a3a6bd6e919d5eaf86e020a8e89138a /testapi/opnfv_testapi/tests/unit/resources/test_scenario.py | |
parent | 78d0e080f597776d62f0a4c51a21538faf29c1a3 (diff) | |
parent | f8cc76bb48d0339359d8953d9c073fa79bc391dd (diff) |
Merge "update scenario name"
Diffstat (limited to 'testapi/opnfv_testapi/tests/unit/resources/test_scenario.py')
-rw-r--r-- | testapi/opnfv_testapi/tests/unit/resources/test_scenario.py | 17 |
1 files changed, 17 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 4f0fad4..1367fc6 100644 --- a/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py +++ b/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py @@ -179,6 +179,8 @@ class TestScenarioUpdate(TestScenarioBase): elif item in ['versions']: locator = 'installer={}'.format( self.installer) + elif item in ['rename']: + self.update_url = self.scenario_url if locator: self.update_url = '{}?{}'.format(self.update_url, locator) @@ -409,6 +411,21 @@ class TestScenarioUpdate(TestScenarioBase): installers) return deletes + @update_url_fixture('rename') + @update_partial('_update', '_success') + def test_renameScenario(self): + new_name = 'new_scenario_name' + update = models.ScenarioUpdateRequest(name=new_name) + self.req_d['name'] = new_name + return update + + @update_url_fixture('rename') + @update_partial('_update', '_forbidden') + def test_renameScenario_exist(self): + new_name = self.req_d['name'] + update = models.ScenarioUpdateRequest(name=new_name) + return update + def _add(self, update_req): return self.post_direct_url(self.update_url, update_req) |