aboutsummaryrefslogtreecommitdiffstats
path: root/functest/cli/commands/cli_testcase.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2017-05-19 08:34:18 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-19 08:34:18 +0000
commit167b2c84d1d9bede32c17354139ac91e86d85d7d (patch)
treeb803d5bfb01b8c410c9ae205a68fb0545f0d3a64 /functest/cli/commands/cli_testcase.py
parent2d0027b13ed1a5a6f35666b2b74be0fc8b4f7b5f (diff)
parent1cbb37c19631f1b7602deeab6d2784c48484f1d0 (diff)
Merge "Replace CONST.* by getattribute/setattr for cli"
Diffstat (limited to 'functest/cli/commands/cli_testcase.py')
-rw-r--r--functest/cli/commands/cli_testcase.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/functest/cli/commands/cli_testcase.py b/functest/cli/commands/cli_testcase.py
index 6644a0c2..3d3f1cb3 100644
--- a/functest/cli/commands/cli_testcase.py
+++ b/functest/cli/commands/cli_testcase.py
@@ -22,9 +22,10 @@ import functest.utils.functest_vacation as vacation
class CliTestcase(object):
def __init__(self):
- self.tiers = tb.TierBuilder(CONST.INSTALLER_TYPE,
- CONST.DEPLOY_SCENARIO,
- CONST.functest_testcases_yaml)
+ self.tiers = tb.TierBuilder(
+ CONST.__getattribute__('INSTALLER_TYPE'),
+ CONST.__getattribute__('DEPLOY_SCENARIO'),
+ CONST.__getattribute__('functest_testcases_yaml'))
def list(self):
summary = ""
@@ -52,12 +53,14 @@ class CliTestcase(object):
if testname == 'vacation':
vacation.main()
- elif not os.path.isfile(CONST.env_active):
+ elif not os.path.isfile(CONST.__getattribute__('env_active')):
click.echo("Functest environment is not ready. "
"Run first 'functest env prepare'")
else:
tests = testname.split(",")
for test in tests:
cmd = ("python %s/functest/ci/run_tests.py "
- "%s -t %s" % (CONST.dir_repo_functest, flags, test))
+ "%s -t %s" %
+ (CONST.__getattribute__('dir_repo_functest'),
+ flags, test))
ft_utils.execute_command(cmd)