summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/tests
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-08-21 17:27:52 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-08-21 17:34:06 +0800
commiteccc03242b495920115846e0add3e5e48a50a027 (patch)
treee3552740ff513f4586601a507f17aecef231ab8e /testapi/opnfv_testapi/tests
parent53a6af264a6c5d8a32d364270f4ef95e8769e3e3 (diff)
change scenario owner
1 bugfix owner must be explicit in ScenarioVersion model 2 change owner of scenario 3. usage: PUT /api/v1/scenarios/<scenario_name>/owner? \ installer=<installer_name>& \ version=<version_name> body: new owner Change-Id: I261468cd8445030b61e37e0f804b699d6205bdb0 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.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py b/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py
index 8c54e7d..466caaf 100644
--- a/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py
+++ b/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py
@@ -172,7 +172,7 @@ class TestScenarioUpdate(TestScenarioBase):
def _update_url_fixture(xstep):
def wrapper(self, *args, **kwargs):
locator = None
- if item == 'projects':
+ if item in ['projects', 'owner']:
locator = 'installer={}&version={}'.format(
self.installer,
self.version)
@@ -294,6 +294,13 @@ class TestScenarioUpdate(TestScenarioBase):
projects)
return deletes, scenario
+ @update_url_fixture('owner')
+ @update_partial('_update', '_success')
+ def test_changeOwner(self, scenario):
+ new_owner = 'new_owner'
+ scenario['installers'][0]['versions'][0]['owner'] = 'www'
+ return new_owner, scenario
+
def _add(self, update_req, new_scenario):
return self.post_direct_url(self.update_url, update_req)