diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2017-02-14 10:31:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-02-14 10:31:44 +0000 |
commit | 33ee390f8324175ae59775bc2589711a60f03939 (patch) | |
tree | 1474e8620dfd367559fcf25e786f5a402c17bb96 /functest/tests | |
parent | 66d02a85d91c5981ae3c2ebf5fa5b1e51c7ad143 (diff) | |
parent | 1e60ed4a402d579675fbf122702a5b8fd3225e3a (diff) |
Merge changes from topic 'revert_write_to_file'
* changes:
Add can_dump_request_to_file decorator
Revert "write test results to a local file"
Diffstat (limited to 'functest/tests')
-rw-r--r-- | functest/tests/unit/core/test_testcase_base.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/functest/tests/unit/core/test_testcase_base.py b/functest/tests/unit/core/test_testcase_base.py index 94d2e966..b7c81d87 100644 --- 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) |