From f4e49ae7753901336814ccbd26003ac229440f5b Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Wed, 20 Dec 2017 19:19:20 +0100 Subject: Remove logger_test_results MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was only called in Feature which the result is already printed (see __str__()). It also eases moving Feature to xtesting as it breaks the link to functest_utils. Change-Id: Ib72d651dc7d89598704ff4d52d8b1ecb2bdade5b Signed-off-by: Cédric Ollivier --- functest/tests/unit/utils/test_functest_utils.py | 32 ------------------------ 1 file changed, 32 deletions(-) (limited to 'functest/tests/unit') diff --git a/functest/tests/unit/utils/test_functest_utils.py b/functest/tests/unit/utils/test_functest_utils.py index 17fb4c1f..7a77d25b 100644 --- a/functest/tests/unit/utils/test_functest_utils.py +++ b/functest/tests/unit/utils/test_functest_utils.py @@ -113,38 +113,6 @@ class FunctestUtilsTesting(unittest.TestCase): CONST.__setattr__('BUILD_TAG', 'unknown_build_tag') self.assertEqual(functest_utils.get_version(), "unknown") - @mock.patch('functest.utils.functest_utils.logger.info') - def test_logger_test_results(self, mock_logger_info): - CONST.__setattr__('results_test_db_url', self.db_url) - CONST.__setattr__('BUILD_TAG', self.build_tag) - CONST.__setattr__('NODE_NAME', self.node_name) - CONST.__setattr__('DEPLOY_SCENARIO', self.scenario) - with mock.patch('functest.utils.functest_utils.get_version', - return_value=self.version): - functest_utils.logger_test_results(self.project, self.case_name, - self.status, self.details) - mock_logger_info.assert_called_once_with( - "\n" - "****************************************\n" - "\t %(p)s/%(n)s results \n\n" - "****************************************\n" - "DB:\t%(db)s\n" - "pod:\t%(pod)s\n" - "version:\t%(v)s\n" - "scenario:\t%(s)s\n" - "status:\t%(c)s\n" - "build tag:\t%(b)s\n" - "details:\t%(d)s\n" - % {'p': self.project, - 'n': self.case_name, - 'db': CONST.__getattribute__('results_test_db_url'), - 'pod': self.node_name, - 'v': self.version, - 's': self.scenario, - 'c': self.status, - 'b': self.build_tag, - 'd': self.details}) - def _get_env_dict(self, var): dic = {'INSTALLER_TYPE': self.installer, 'DEPLOY_SCENARIO': self.scenario, -- cgit 1.2.3-korg