From 00bf0cae0160ff8318a455bd0dc80911a8a1d707 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Wed, 8 Feb 2017 15:18:24 +0100 Subject: Revert "write test results to a local file" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ee21af78fbfc93e888acda121f08d2b216dd0159. Change-Id: If7c8d3b645073574862eb67225b1e11b0dd7a021 Signed-off-by: Cédric Ollivier --- functest/tests/unit/core/test_testcase_base.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'functest/tests/unit/core/test_testcase_base.py') diff --git a/functest/tests/unit/core/test_testcase_base.py b/functest/tests/unit/core/test_testcase_base.py index 94d2e966..b7c81d87 100755 --- a/functest/tests/unit/core/test_testcase_base.py +++ b/functest/tests/unit/core/test_testcase_base.py @@ -9,7 +9,6 @@ import logging import mock -import os import unittest from functest.core import testcase_base @@ -32,12 +31,11 @@ class TestcaseBaseTesting(unittest.TestCase): self.assertEqual(self.test.run(), testcase_base.TestcaseBase.EX_RUN_ERROR) - @mock.patch.dict(os.environ, {}) @mock.patch('functest.utils.functest_utils.push_results_to_db', return_value=False) def _test_missing_attribute(self, mock_function): - self.assertEqual(self.test.publish_report(), - testcase_base.TestcaseBase.EX_PUBLISH_RESULT_FAILED) + self.assertEqual(self.test.push_to_db(), + testcase_base.TestcaseBase.EX_PUSH_TO_DB_ERROR) mock_function.assert_not_called() def test_missing_case_name(self): @@ -70,7 +68,7 @@ class TestcaseBaseTesting(unittest.TestCase): return_value=False) def test_push_to_db_failed(self, mock_function): self.assertEqual(self.test.push_to_db(), - testcase_base.TestcaseBase.EX_PUBLISH_RESULT_FAILED) + testcase_base.TestcaseBase.EX_PUSH_TO_DB_ERROR) mock_function.assert_called_once_with( self.test.project, self.test.case_name, self.test.start_time, self.test.stop_time, self.test.criteria, self.test.details) -- cgit 1.2.3-korg