diff options
author | 2017-05-11 10:03:47 +0200 | |
---|---|---|
committer | 2017-05-11 13:45:23 +0200 | |
commit | 648d31af02248b8b2da059e228c10f1e3f81eb5b (patch) | |
tree | bd52f9c24facd70134e0a083d3a20aceca3b4939 /functest/tests/unit/core/test_testcase.py | |
parent | 5b536321b8722f87715cab7bae3f6813bb73fd2a (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/unit/core/test_testcase.py')
-rw-r--r-- | functest/tests/unit/core/test_testcase.py | 6 |
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' |