summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-08-23 11:09:15 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-08-23 11:09:15 +0800
commite88f970be0b145ce07bf7b32826853d21dca7945 (patch)
tree3df25c21067c8b9667f1f68cd210e60a7c1f94bb /utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py
parent5bec8614dd747bf62336ae4ecf5393869643ad09 (diff)
bugfix: malfunction of scenario equal check
1. bugfix equal check with[] will return list[false, true], and always True in next step check 2. in assert_res() leverage '==' will never assert even if they are not equal Change-Id: I683e3489d45b98b508f8ab8b6ef268ca9a1ebd5f Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
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.py5
1 files changed, 2 insertions, 3 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 466caaf13..f9bb58c6b 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
@@ -47,8 +47,7 @@ class TestScenarioBase(base.TestBase):
req = self.req_d
self.assertIsNotNone(scenario._id)
self.assertIsNotNone(scenario.creation_date)
-
- scenario == models.Scenario.from_dict(req)
+ self.assertEqual(scenario, models.Scenario.from_dict(req))
@staticmethod
def _set_query(*args):
@@ -298,7 +297,7 @@ class TestScenarioUpdate(TestScenarioBase):
@update_partial('_update', '_success')
def test_changeOwner(self, scenario):
new_owner = 'new_owner'
- scenario['installers'][0]['versions'][0]['owner'] = 'www'
+ scenario['installers'][0]['versions'][0]['owner'] = new_owner
return new_owner, scenario
def _add(self, update_req, new_scenario):