diff options
author | helenyao <yaohelan@huawei.com> | 2016-12-01 21:52:43 -0500 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2016-12-02 17:01:19 +0100 |
commit | dc733c31177b0ffdc4c30b9c4801b765909f1c50 (patch) | |
tree | 574c2eccbece763723e72d1a23251d3495f939ea /functest/tests/unit/core | |
parent | 9e469ae7bb108bc38cbb9fa8e6a81e8f3ff9a1a7 (diff) |
Rename TestCasesBase into TestcaseBase
JIRA: FUNCTEST-628
1. rename the TestCasesBase into TestcaseBase
2. updated the module name to testcase_base.py
Change-Id: Ic6b5d8209098c136613a2419c3790668fdbd493e
Signed-off-by: helenyao <yaohelan@huawei.com>
Diffstat (limited to 'functest/tests/unit/core')
-rw-r--r-- | functest/tests/unit/core/test_testcase_base.py (renamed from functest/tests/unit/core/test_base.py) | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/functest/tests/unit/core/test_base.py b/functest/tests/unit/core/test_testcase_base.py index 154cc78a..fe7b0d05 100644 --- a/functest/tests/unit/core/test_base.py +++ b/functest/tests/unit/core/test_testcase_base.py @@ -11,15 +11,15 @@ import logging import mock import unittest -from functest.core import TestCasesBase +import functest.core.testcase_base as testcase_base -class TestCasesBaseTesting(unittest.TestCase): +class TestcaseBaseTesting(unittest.TestCase): logging.disable(logging.CRITICAL) def setUp(self): - self.test = TestCasesBase.TestCasesBase() + self.test = testcase_base.TestcaseBase() self.test.project = "functest" self.test.case_name = "base" self.test.start_time = "1" @@ -29,13 +29,13 @@ class TestCasesBaseTesting(unittest.TestCase): def test_run_unimplemented(self): self.assertEqual(self.test.run(), - TestCasesBase.TestCasesBase.EX_RUN_ERROR) + testcase_base.TestcaseBase.EX_RUN_ERROR) @mock.patch('functest.utils.functest_utils.push_results_to_db', return_value=False) def _test_missing_attribute(self, mock_function): self.assertEqual(self.test.push_to_db(), - TestCasesBase.TestCasesBase.EX_PUSH_TO_DB_ERROR) + testcase_base.TestcaseBase.EX_PUSH_TO_DB_ERROR) mock_function.assert_not_called() def test_missing_case_name(self): @@ -59,7 +59,7 @@ class TestCasesBaseTesting(unittest.TestCase): def test_missing_details(self, mock_function): self.test.details = None self.assertEqual(self.test.push_to_db(), - TestCasesBase.TestCasesBase.EX_OK) + testcase_base.TestcaseBase.EX_OK) 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) @@ -68,7 +68,7 @@ class TestCasesBaseTesting(unittest.TestCase): return_value=False) def test_push_to_db_failed(self, mock_function): self.assertEqual(self.test.push_to_db(), - TestCasesBase.TestCasesBase.EX_PUSH_TO_DB_ERROR) + 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) @@ -77,7 +77,7 @@ class TestCasesBaseTesting(unittest.TestCase): return_value=True) def test_push_to_db(self, mock_function): self.assertEqual(self.test.push_to_db(), - TestCasesBase.TestCasesBase.EX_OK) + testcase_base.TestcaseBase.EX_OK) 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) |