aboutsummaryrefslogtreecommitdiffstats
path: root/functest/core/testcase_base.py
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/core/testcase_base.py
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/core/testcase_base.py')
-rw-r--r--functest/core/testcase_base.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/functest/core/testcase_base.py b/functest/core/testcase_base.py
index 2848073f..85d1fc74 100644
--- a/functest/core/testcase_base.py
+++ b/functest/core/testcase_base.py
@@ -13,7 +13,7 @@ import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
-class TestcaseBase(object):
+class TestCase(object):
EX_OK = os.EX_OK
EX_RUN_ERROR = os.EX_SOFTWARE
@@ -34,15 +34,15 @@ class TestcaseBase(object):
try:
assert self.criteria
if self.criteria == 'PASS':
- return TestcaseBase.EX_OK
+ return TestCase.EX_OK
except AssertionError:
self.logger.error("Please run test before checking the results")
- return TestcaseBase.EX_TESTCASE_FAILED
+ return TestCase.EX_TESTCASE_FAILED
def run(self, **kwargs):
# pylint: disable=unused-argument
self.logger.error("Run must be implemented")
- return TestcaseBase.EX_RUN_ERROR
+ return TestCase.EX_RUN_ERROR
def push_to_db(self):
try:
@@ -55,10 +55,10 @@ class TestcaseBase(object):
self.project_name, self.case_name, self.start_time,
self.stop_time, self.criteria, self.details):
self.logger.info("The results were successfully pushed to DB")
- return TestcaseBase.EX_OK
+ return TestCase.EX_OK
else:
self.logger.error("The results cannot be pushed to DB")
- return TestcaseBase.EX_PUSH_TO_DB_ERROR
+ return TestCase.EX_PUSH_TO_DB_ERROR
except Exception: # pylint: disable=broad-except
self.logger.exception("The results cannot be pushed to DB")
- return TestcaseBase.EX_PUSH_TO_DB_ERROR
+ return TestCase.EX_PUSH_TO_DB_ERROR