From 6746ada2e8c837da948c3260ceb8829ea1fc27de Mon Sep 17 00:00:00 2001 From: Ross Brattain Date: Mon, 5 Jun 2017 23:59:25 -0700 Subject: [PATCH] fix No handler warning by calling _init_logging No handlers could be found for logger It looks like we need to call _init_logging to properly setup the logging during unittests. This should fix the influxdb unittest warning. JIRA: YARDSTICK-506 Change-Id: I57f6e4088005a691d6587fc68b85455ff257a66c Signed-off-by: Ross Brattain --- tests/unit/dispatcher/test_influxdb.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/unit/dispatcher/test_influxdb.py b/tests/unit/dispatcher/test_influxdb.py index 0c7b58135..dca3c4189 100644 --- a/tests/unit/dispatcher/test_influxdb.py +++ b/tests/unit/dispatcher/test_influxdb.py @@ -14,11 +14,15 @@ from __future__ import absolute_import import unittest + try: from unittest import mock except ImportError: import mock +from yardstick import _init_logging +_init_logging() + from yardstick.dispatcher.influxdb import InfluxdbDispatcher -- 2.16.6