aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/core
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-06-14 00:14:59 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2017-06-14 03:57:15 +0200
commit088ac89c10a1a69fdb14dc13280dacd2830a7d29 (patch)
tree952168ca0d9e4018c4115a8b47e528f2cacd3e3e /functest/tests/unit/core
parentfb3ef61a03cdf2fb938d771e9d23f6435cff240f (diff)
Update Suite details pushed to DB
It now reports stats and dumps stream into details. By the way, it fixes a bug when serializing the former details. Change-Id: Idd388708071ca3185e5a07bc7e977f2d9837dc95 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests/unit/core')
-rw-r--r--functest/tests/unit/core/test_unit.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/functest/tests/unit/core/test_unit.py b/functest/tests/unit/core/test_unit.py
index 79c4e7d7..ca73de67 100644
--- a/functest/tests/unit/core/test_unit.py
+++ b/functest/tests/unit/core/test_unit.py
@@ -41,7 +41,9 @@ class PyTestSuiteRunnerTesting(unittest.TestCase):
self._test_run(result=mock_result,
status=testcase.TestCase.EX_RUN_ERROR)
self.assertEqual(self.psrunner.result, 0)
- self.assertEqual(self.psrunner.details, {'errors': [], 'failures': []})
+ self.assertEqual(self.psrunner.details,
+ {'errors': 0, 'failures': 0, 'stream': '',
+ 'testsRun': 0})
self.assertEqual(self.psrunner.is_successful(),
testcase.TestCase.EX_TESTCASE_FAILED)
@@ -52,8 +54,8 @@ class PyTestSuiteRunnerTesting(unittest.TestCase):
self._test_run(result=mock_result)
self.assertEqual(self.psrunner.result, 96)
self.assertEqual(self.psrunner.details,
- {'errors': [('test1', 'error_msg1')],
- 'failures': [('test2', 'failure_msg1')]})
+ {'errors': 1, 'failures': 1, 'stream': '',
+ 'testsRun': 50})
self.assertEqual(self.psrunner.is_successful(),
testcase.TestCase.EX_TESTCASE_FAILED)
@@ -62,7 +64,9 @@ class PyTestSuiteRunnerTesting(unittest.TestCase):
failures=[])
self._test_run(result=mock_result)
self.assertEqual(self.psrunner.result, 100)
- self.assertEqual(self.psrunner.details, {'errors': [], 'failures': []})
+ self.assertEqual(self.psrunner.details,
+ {'errors': 0, 'failures': 0, 'stream': '',
+ 'testsRun': 50})
self.assertEqual(self.psrunner.is_successful(),
testcase.TestCase.EX_OK)