From 46f1037fe35bc249dca868b363107bc1bcd70469 Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Tue, 19 Dec 2017 09:23:04 +0000 Subject: Improve the way of setting values in CONST Use setattr instead of internal method (__setattr__). It must be completed by patches fixing [1] [2] and [3]. [1] https://jira.opnfv.org/browse/FUNCTEST-930 [2] https://jira.opnfv.org/browse/FUNCTEST-931 [3] https://jira.opnfv.org/browse/FUNCTEST-932 Change-Id: I9558f33f5ed4559b6031d75951d5637c0c0ef8cb Signed-off-by: Linda Wang --- functest/opnfv_tests/sdn/odl/odl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'functest/opnfv_tests/sdn') diff --git a/functest/opnfv_tests/sdn/odl/odl.py b/functest/opnfv_tests/sdn/odl/odl.py index 25cc758ea..6af49ffaf 100644 --- a/functest/opnfv_tests/sdn/odl/odl.py +++ b/functest/opnfv_tests/sdn/odl/odl.py @@ -38,7 +38,7 @@ __author__ = "Cedric Ollivier " class ODLTests(robotframework.RobotFramework): """ODL test runner.""" - odl_test_repo = constants.CONST.__getattribute__('dir_repo_odl_test') + odl_test_repo = getattr(constants.CONST, 'dir_repo_odl_test') neutron_suite_dir = os.path.join( odl_test_repo, "csit/suites/openstack/neutron") basic_suite_dir = os.path.join( @@ -51,7 +51,7 @@ class ODLTests(robotframework.RobotFramework): def __init__(self, **kwargs): super(ODLTests, self).__init__(**kwargs) self.res_dir = os.path.join( - constants.CONST.__getattribute__('dir_results'), 'odl') + getattr(constants.CONST, 'dir_results'), 'odl') self.xml_file = os.path.join(self.res_dir, 'output.xml') @classmethod -- cgit 1.2.3-korg