diff options
Diffstat (limited to 'functest')
-rw-r--r-- | functest/core/pytest_suite_runner.py | 9 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/ims/opera_ims.py | 8 |
2 files changed, 10 insertions, 7 deletions
diff --git a/functest/core/pytest_suite_runner.py b/functest/core/pytest_suite_runner.py index bcbaa25d..0dd860d2 100644 --- a/functest/core/pytest_suite_runner.py +++ b/functest/core/pytest_suite_runner.py @@ -13,8 +13,6 @@ import time from functest.core import testcase -logging.basicConfig() - class PyTestSuiteRunner(testcase.TestCase): """ @@ -23,13 +21,18 @@ class PyTestSuiteRunner(testcase.TestCase): """ def __init__(self, **kwargs): super(PyTestSuiteRunner, self).__init__(**kwargs) - self.logger = logging.getLogger(self.__class__.__name__) self.suite = None + self.logger = logging.getLogger(__name__) def run(self, **kwargs): """ Starts test execution from the functest framework """ + try: + name = kwargs["name"] + self.suite = unittest.TestLoader().loadTestsFromName(name) + except KeyError: + pass self.start_time = time.time() result = unittest.TextTestRunner(verbosity=2).run(self.suite) self.stop_time = time.time() diff --git a/functest/opnfv_tests/vnf/ims/opera_ims.py b/functest/opnfv_tests/vnf/ims/opera_ims.py index 8defdee6..8c33d16e 100644 --- a/functest/opnfv_tests/vnf/ims/opera_ims.py +++ b/functest/opnfv_tests/vnf/ims/opera_ims.py @@ -16,14 +16,14 @@ from opera import openo_connect import requests import functest.opnfv_tests.vnf.ims.clearwater_ims_base as clearwater_ims_base -from functest.utils.constants import CONST class OperaIms(clearwater_ims_base.ClearwaterOnBoardingBase): - def __init__(self, project='functest', case_name='opera_ims', - repo=CONST.dir_repo_opera, cmd=''): - super(OperaIms, self).__init__(project, case_name, repo, cmd) + def __init__(self, **kwargs): + if "case_name" not in kwargs: + kwargs["case_name"] = "opera_ims" + super(OperaIms, self).__init__(**kwargs) self.logger = logging.getLogger(__name__) self.ellis_file = os.path.join(self.result_dir, 'ellis.info') self.live_test_file = os.path.join(self.result_dir, |