Enable tempest offline by use_custom_images=True
[functest.git] / functest / tests / unit / core / test_testcase.py
index d017e41..ef0983c 100644 (file)
@@ -20,12 +20,9 @@ __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)
-
     _case_name = "base"
     _project_name = "functest"
     _published_result = "PASS"
@@ -191,11 +188,13 @@ class TestCaseTesting(unittest.TestCase):
 
     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'
@@ -224,4 +223,5 @@ class TestCaseTesting(unittest.TestCase):
 
 
 if __name__ == "__main__":
+    logging.disable(logging.CRITICAL)
     unittest.main(verbosity=2)