aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/core
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-03-27 09:33:20 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2017-03-27 10:27:02 +0200
commit407d27585f109e3381bb49041abc49a14b7b5bfe (patch)
tree8a4ca0b636a7c4b4a8bd2ba1f6bfa1a1292ac64e /functest/tests/unit/core
parent8d177dd1ac61078cb4134a1ff925ce25a777f5a0 (diff)
Switch TestcaseBase to TestCase
It partially reverts "Rename TestCasesBase into TestcaseBase" [1] and removes the useless suffix too. [1] https://gerrit.opnfv.org/gerrit/#/c/25391/ Change-Id: Iddf2ec8d6c1dafe6e4c6713c2e69969613317471 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests/unit/core')
-rw-r--r--functest/tests/unit/core/test_testcase_base.py20
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 182da6ea..a98caead 100644
--- a/functest/tests/unit/core/test_testcase_base.py
+++ b/functest/tests/unit/core/test_testcase_base.py
@@ -15,12 +15,12 @@ import mock
from functest.core import testcase_base
-class TestcaseBaseTesting(unittest.TestCase):
+class TestCaseTesting(unittest.TestCase):
logging.disable(logging.CRITICAL)
def setUp(self):
- self.test = testcase_base.TestcaseBase()
+ self.test = testcase_base.TestCase()
self.test.project = "functest"
self.test.case_name = "base"
self.test.start_time = "1"
@@ -30,13 +30,13 @@ class TestcaseBaseTesting(unittest.TestCase):
def test_run_unimplemented(self):
self.assertEqual(self.test.run(),
- testcase_base.TestcaseBase.EX_RUN_ERROR)
+ testcase_base.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.TestcaseBase.EX_PUSH_TO_DB_ERROR)
+ testcase_base.TestCase.EX_PUSH_TO_DB_ERROR)
mock_function.assert_not_called()
def test_missing_case_name(self):
@@ -60,7 +60,7 @@ class TestcaseBaseTesting(unittest.TestCase):
def test_missing_details(self, mock_function=None):
self.test.details = None
self.assertEqual(self.test.push_to_db(),
- testcase_base.TestcaseBase.EX_OK)
+ testcase_base.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 TestcaseBaseTesting(unittest.TestCase):
return_value=False)
def test_push_to_db_failed(self, mock_function=None):
self.assertEqual(self.test.push_to_db(),
- testcase_base.TestcaseBase.EX_PUSH_TO_DB_ERROR)
+ testcase_base.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 TestcaseBaseTesting(unittest.TestCase):
return_value=True)
def test_push_to_db(self, mock_function=None):
self.assertEqual(self.test.push_to_db(),
- testcase_base.TestcaseBase.EX_OK)
+ testcase_base.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 TestcaseBaseTesting(unittest.TestCase):
def test_check_criteria_missing(self):
self.test.criteria = None
self.assertEqual(self.test.check_criteria(),
- testcase_base.TestcaseBase.EX_TESTCASE_FAILED)
+ testcase_base.TestCase.EX_TESTCASE_FAILED)
def test_check_criteria_failed(self):
self.test.criteria = 'FAILED'
self.assertEqual(self.test.check_criteria(),
- testcase_base.TestcaseBase.EX_TESTCASE_FAILED)
+ testcase_base.TestCase.EX_TESTCASE_FAILED)
def test_check_criteria_pass(self):
self.test.criteria = 'PASS'
self.assertEqual(self.test.check_criteria(),
- testcase_base.TestcaseBase.EX_OK)
+ testcase_base.TestCase.EX_OK)
if __name__ == "__main__":