summaryrefslogtreecommitdiffstats
path: root/dovetail/tests/unit
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2019-10-09 02:50:05 -0400
committerxudan <xudan16@huawei.com>2019-10-12 03:39:57 -0400
commit0d733e25f6531594cf27dbf3fe69e8f2229b5fa7 (patch)
tree84bf4ecc66736657c6f889379065d4df838657e7 /dovetail/tests/unit
parent48d735cc1bec3b842d06a72992dc36c8799af381 (diff)
Bugfix: got an error on ci when rally tests failed
see https://build.opnfv.org/ci/view/dovetail/job/dovetail-fuel-baremetal-proposed_tests-optional-hunter/10/console Change-Id: I7c9b0426603c22a2ef5f4b15ca26fbc0768bd19f Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/tests/unit')
-rw-r--r--dovetail/tests/unit/test_report.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/dovetail/tests/unit/test_report.py b/dovetail/tests/unit/test_report.py
index fe6530c9..69cde0d5 100644
--- a/dovetail/tests/unit/test_report.py
+++ b/dovetail/tests/unit/test_report.py
@@ -640,6 +640,28 @@ class ReportTesting(unittest.TestCase):
'Result file not found: {}'.format(file_path))
self.assertEqual(None, result)
+ def test_functest_crawler_get_details_exception(self):
+ logger_obj = Mock()
+ dt_report.FunctestCrawler.logger = logger_obj
+ data = None
+ crawler = dt_report.FunctestCrawler()
+
+ excepted = None
+ result = crawler.get_details(data)
+ logger_obj.exception.assert_called_once()
+ self.assertEqual(excepted, result)
+
+ def test_functest_crawler_get_rally_details_exception(self):
+ logger_obj = Mock()
+ dt_report.FunctestCrawler.logger = logger_obj
+ data = None
+ crawler = dt_report.FunctestCrawler()
+
+ excepted = None
+ result = crawler.get_rally_details(data)
+ logger_obj.exception.assert_called_once()
+ self.assertEqual(excepted, result)
+
@patch('builtins.open')
@patch('dovetail.report.json')
@patch('dovetail.report.dt_cfg')