summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/tests/unit
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-03-01 15:29:22 +0800
committerSerena Feng <feng.xiaowei@zte.com.cn>2017-03-01 09:14:17 +0000
commit3cb5e9d6f7e585150ca67eaaf879a3b856eb45a3 (patch)
treeb01e082447cc94298463bc4d3ed5f4bf0d19777f /testapi/opnfv_testapi/tests/unit
parent9a3633ebd76e3f0ad5e9d6a3f6221dbfe03411ee (diff)
bugfix unittest test_queryProject occasionally failed in TestAPI
error message: "E AssertionError: Mismatched values: u'installers', expected:[], actual: [] Change-Id: Ieae5fdfd2a044909784cbb4766a5d25f4bbafcea Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi/opnfv_testapi/tests/unit')
-rw-r--r--testapi/opnfv_testapi/tests/unit/test_scenario.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/testapi/opnfv_testapi/tests/unit/test_scenario.py b/testapi/opnfv_testapi/tests/unit/test_scenario.py
index f604c57..7a6e94a 100644
--- a/testapi/opnfv_testapi/tests/unit/test_scenario.py
+++ b/testapi/opnfv_testapi/tests/unit/test_scenario.py
@@ -39,10 +39,10 @@ class TestScenarioBase(base.TestBase):
self.assertEqual(code, constants.HTTP_OK)
if req is None:
req = self.req_d
- scenario_dict = scenario.format_http()
- self.assertIsNotNone(scenario_dict['_id'])
- self.assertIsNotNone(scenario_dict['creation_date'])
- self.assertDictContainsSubset(req, scenario_dict)
+ self.assertIsNotNone(scenario._id)
+ self.assertIsNotNone(scenario.creation_date)
+
+ scenario == models.Scenario.from_dict(req)
@staticmethod
def _set_query(*args):