aboutsummaryrefslogtreecommitdiffstats
path: root/functest/core/feature_base.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-12-21 15:42:54 +0800
committerjose.lausuch <jose.lausuch@ericsson.com>2016-12-21 12:55:44 +0100
commita59fea1046d167b4609c9b86836d178e799dc688 (patch)
tree64972a06ba7d10bbde13e63345136126dfa10a6e /functest/core/feature_base.py
parent3592444c8abcaca3312d831fd610d82bffd627ea (diff)
Refactor test run related modules using new constants provider
JIRA: FUNCTEST-673 Change-Id: Ia37fb5a08c8fbc4a8acb666565ea887f9ae48b83 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'functest/core/feature_base.py')
-rw-r--r--functest/core/feature_base.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/functest/core/feature_base.py b/functest/core/feature_base.py
index 780170d4..873e21da 100644
--- a/functest/core/feature_base.py
+++ b/functest/core/feature_base.py
@@ -3,6 +3,7 @@ import time
import testcase_base as base
import functest.utils.functest_utils as ft_utils
import functest.utils.functest_logger as ft_logger
+from functest.utils.constants import CONST
class FeatureBase(base.TestcaseBase):
@@ -11,7 +12,7 @@ class FeatureBase(base.TestcaseBase):
self.project_name = project
self.case_name = case
self.cmd = cmd
- self.repo = self.get_conf('general.dir.{}'.format(repo))
+ self.repo = CONST.__getattribute__(repo)
self.result_file = self.get_result_file()
self.logger = ft_logger.Logger(project).getLogger()
@@ -44,15 +45,10 @@ class FeatureBase(base.TestcaseBase):
return exit_code
def get_result_file(self):
- dir = self.get_conf('general.dir.results')
- return "{}/{}.log".format(dir, self.project_name)
+ return "{}/{}.log".format(CONST.dir_results, self.project_name)
def log_results(self):
ft_utils.logger_test_results(self.project_name,
self.case_name,
self.criteria,
self.details)
-
- @staticmethod
- def get_conf(parameter):
- return ft_utils.get_functest_config(parameter)