diff options
author | Cedric Ollivier <ollivier.cedric@gmail.com> | 2017-03-28 08:12:21 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-03-28 08:12:21 +0000 |
commit | 18ffb2a431fd82055cd5abf656f00f2c90af7146 (patch) | |
tree | 67cb1e8045812d29517a026ac5cc09f4bab28009 /functest/tests/unit/core | |
parent | 514c97b036cf968e03e600a4761757448bef0a0a (diff) | |
parent | 69e51470d8e9f51e02d5f0bd6e957c4e24c603c6 (diff) |
Merge "Rename testcase_base to testcase"
Diffstat (limited to 'functest/tests/unit/core')
-rw-r--r-- | functest/tests/unit/core/test_testcase_base.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/functest/tests/unit/core/test_testcase_base.py b/functest/tests/unit/core/test_testcase_base.py index a98caead..9ee1609f 100644 --- a/functest/tests/unit/core/test_testcase_base.py +++ b/functest/tests/unit/core/test_testcase_base.py @@ -12,7 +12,7 @@ import unittest import mock -from functest.core import testcase_base +from functest.core import testcase class TestCaseTesting(unittest.TestCase): @@ -20,7 +20,7 @@ class TestCaseTesting(unittest.TestCase): logging.disable(logging.CRITICAL) def setUp(self): - self.test = testcase_base.TestCase() + self.test = testcase.TestCase() self.test.project = "functest" self.test.case_name = "base" self.test.start_time = "1" @@ -30,13 +30,13 @@ class TestCaseTesting(unittest.TestCase): def test_run_unimplemented(self): self.assertEqual(self.test.run(), - testcase_base.TestCase.EX_RUN_ERROR) + testcase.TestCase.EX_RUN_ERROR) @mock.patch('functest.utils.functest_utils.push_results_to_db', return_value=False) def _test_missing_attribute(self, mock_function=None): self.assertEqual(self.test.push_to_db(), - testcase_base.TestCase.EX_PUSH_TO_DB_ERROR) + testcase.TestCase.EX_PUSH_TO_DB_ERROR) mock_function.assert_not_called() def test_missing_case_name(self): @@ -60,7 +60,7 @@ class TestCaseTesting(unittest.TestCase): def test_missing_details(self, mock_function=None): self.test.details = None self.assertEqual(self.test.push_to_db(), - testcase_base.TestCase.EX_OK) + testcase.TestCase.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) @@ -69,7 +69,7 @@ class TestCaseTesting(unittest.TestCase): return_value=False) def test_push_to_db_failed(self, mock_function=None): self.assertEqual(self.test.push_to_db(), - testcase_base.TestCase.EX_PUSH_TO_DB_ERROR) + testcase.TestCase.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) @@ -78,7 +78,7 @@ class TestCaseTesting(unittest.TestCase): return_value=True) def test_push_to_db(self, mock_function=None): self.assertEqual(self.test.push_to_db(), - testcase_base.TestCase.EX_OK) + testcase.TestCase.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) @@ -86,17 +86,17 @@ class TestCaseTesting(unittest.TestCase): def test_check_criteria_missing(self): self.test.criteria = None self.assertEqual(self.test.check_criteria(), - testcase_base.TestCase.EX_TESTCASE_FAILED) + testcase.TestCase.EX_TESTCASE_FAILED) def test_check_criteria_failed(self): self.test.criteria = 'FAILED' self.assertEqual(self.test.check_criteria(), - testcase_base.TestCase.EX_TESTCASE_FAILED) + testcase.TestCase.EX_TESTCASE_FAILED) def test_check_criteria_pass(self): self.test.criteria = 'PASS' self.assertEqual(self.test.check_criteria(), - testcase_base.TestCase.EX_OK) + testcase.TestCase.EX_OK) if __name__ == "__main__": |