From ddcb4fa5ac0a98185a2cde5b10671c573704e0a7 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Wed, 1 Mar 2017 15:29:22 +0800 Subject: 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 --- utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'utils/test/testapi/opnfv_testapi/tests') diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py b/utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py index f604c5750..7a6e94a93 100644 --- a/utils/test/testapi/opnfv_testapi/tests/unit/test_scenario.py +++ b/utils/test/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): -- cgit 1.2.3-korg