X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=functest%2Ftests%2Funit%2Fopenstack%2Ftempest%2Ftest_tempest.py;h=b8b258b3607f24945980981c030ad0f69b632584;hb=ac816628995c1e017f12ba23435ae07d24ceecac;hp=bb75c9ed705a02125c669cb8819f576fb55f2369;hpb=dd9fb78e0553c35eb60e76b2979dac803f818ecb;p=functest.git diff --git a/functest/tests/unit/openstack/tempest/test_tempest.py b/functest/tests/unit/openstack/tempest/test_tempest.py index bb75c9ed7..b8b258b36 100644 --- a/functest/tests/unit/openstack/tempest/test_tempest.py +++ b/functest/tests/unit/openstack/tempest/test_tempest.py @@ -18,8 +18,6 @@ from functest.utils.constants import CONST class OSTempestTesting(unittest.TestCase): - logging.disable(logging.CRITICAL) - def setUp(self): with mock.patch('functest.opnfv_tests.openstack.tempest.tempest.' 'conf_utils.get_verifier_id', @@ -114,8 +112,8 @@ class OSTempestTesting(unittest.TestCase): mock.patch.object(self.tempestcommon, 'read_file', return_value=['test1', 'test2']): conf_utils.TEMPEST_BLACKLIST = Exception - CONST.INSTALLER_TYPE = 'installer_type' - CONST.DEPLOY_SCENARIO = 'deploy_scenario' + CONST.__setattr__('INSTALLER_TYPE', 'installer_type') + CONST.__setattr__('DEPLOY_SCENARIO', 'deploy_scenario') self.tempestcommon.apply_tempest_blacklist() obj = m() obj.write.assert_any_call('test1\n') @@ -130,8 +128,8 @@ class OSTempestTesting(unittest.TestCase): return_value=['test1', 'test2']), \ mock.patch('functest.opnfv_tests.openstack.tempest.tempest.' 'yaml.safe_load', return_value=item_dict): - CONST.INSTALLER_TYPE = 'installer_type' - CONST.DEPLOY_SCENARIO = 'deploy_scenario' + CONST.__setattr__('INSTALLER_TYPE', 'installer_type') + CONST.__setattr__('DEPLOY_SCENARIO', 'deploy_scenario') self.tempestcommon.apply_tempest_blacklist() obj = m() obj.write.assert_any_call('test1\n') @@ -230,4 +228,5 @@ class OSTempestTesting(unittest.TestCase): if __name__ == "__main__": + logging.disable(logging.CRITICAL) unittest.main(verbosity=2)