aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-05-11 10:03:47 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2017-05-11 13:45:23 +0200
commit648d31af02248b8b2da059e228c10f1e3f81eb5b (patch)
treebd52f9c24facd70134e0a083d3a20aceca3b4939 /functest/tests
parent5b536321b8722f87715cab7bae3f6813bb73fd2a (diff)
Modify TestCase.__str__() to use PrettyTable
It adds PrettyTable as requirement even if it's already defined in OpenStack client dependencies. If the TestCase object is considered as invalid, it simply returns the default str. Change-Id: Iee788aef2a13694d9482560977cbbf21c7f2c967 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests')
-rw-r--r--functest/tests/unit/core/test_testcase.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/functest/tests/unit/core/test_testcase.py b/functest/tests/unit/core/test_testcase.py
index b25ce226..08a717a2 100644
--- a/functest/tests/unit/core/test_testcase.py
+++ b/functest/tests/unit/core/test_testcase.py
@@ -191,11 +191,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'