From 746c1eb8b66ef38d3b21db2010cc820cb92c0293 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Fri, 9 Feb 2018 07:01:16 +0100 Subject: Move get_dict_by_test() into run_tests.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It also removes functest_utils.get_criteria_by_test() Change-Id: I3f265642acd053755e32f8e92f1086b93517c247 Signed-off-by: Cédric Ollivier --- functest/utils/functest_utils.py | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'functest/utils/functest_utils.py') diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py index c1491855..e84a2b42 100644 --- a/functest/utils/functest_utils.py +++ b/functest/utils/functest_utils.py @@ -17,7 +17,6 @@ import shutil import subprocess import sys -import pkg_resources import dns.resolver from six.moves import urllib import yaml @@ -135,28 +134,6 @@ def execute_command(cmd, info=False, error_msg="", return returncode -def get_dict_by_test(testname): - # pylint: disable=bad-continuation - with open(pkg_resources.resource_filename( - 'functest', 'ci/testcases.yaml')) as tyaml: - testcases_yaml = yaml.safe_load(tyaml) - - for dic_tier in testcases_yaml.get("tiers"): - for dic_testcase in dic_tier['testcases']: - if dic_testcase['case_name'] == testname: - return dic_testcase - - LOGGER.error('Project %s is not defined in testcases.yaml', testname) - return None - - -def get_criteria_by_test(testname): - tdict = get_dict_by_test(testname) - if tdict: - return tdict['criteria'] - return None - - # ---------------------------------------------------------- # # YAML UTILS -- cgit 1.2.3-korg