# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
-"""Define the classe required to fully cover testcase."""
+"""Define the class required to fully cover testcase."""
import logging
import unittest
+from functest.core import testcase
+
import mock
-from functest.core import testcase
__author__ = "Cedric Ollivier <cedric.ollivier@orange.com>"
class TestCaseTesting(unittest.TestCase):
-
"""The class testing TestCase."""
- # pylint: disable=missing-docstring,too-many-public-methods
- logging.disable(logging.CRITICAL)
+ # pylint: disable=missing-docstring,too-many-public-methods
_case_name = "base"
_project_name = "functest"
def test_str_project_name_ko(self):
self.test.project_name = None
- self.assertIn("INVALID OBJECT", str(self.test))
+ self.assertIn("<functest.core.testcase.TestCase object at",
+ str(self.test))
def test_str_case_name_ko(self):
self.test.case_name = None
- self.assertIn("INVALID OBJECT", str(self.test))
+ self.assertIn("<functest.core.testcase.TestCase object at",
+ str(self.test))
def test_str_pass(self):
duration = '01:01'
self.assertIn(duration, message)
self.assertIn('FAIL', message)
+ def test_clean(self):
+ self.assertEqual(self.test.clean(), None)
+
if __name__ == "__main__":
+ logging.disable(logging.CRITICAL)
unittest.main(verbosity=2)