From b3cc28d84b949907a89d76c54ece73ed1a69f353 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Wed, 29 Nov 2017 23:35:05 +0000 Subject: [PATCH] Move tests: unit/dispatcher * Fix pylint errors * Add TODOs Some errors are ignored locally, as they were a symptom of other problems. These issues have been flagged with a TODO, and should be fixed later. JIRA: YARDSTICK-837 Signed-off-by: Emma Foley Change-Id: I1f8a6041424c4c69f46ef30bd5c66d2d51d24347 --- {tests => yardstick/tests}/unit/dispatcher/__init__.py | 0 {tests => yardstick/tests}/unit/dispatcher/test_influxdb.py | 11 +++-------- .../tests}/unit/dispatcher/test_influxdb_line_protocol.py | 1 - 3 files changed, 3 insertions(+), 9 deletions(-) rename {tests => yardstick/tests}/unit/dispatcher/__init__.py (100%) rename {tests => yardstick/tests}/unit/dispatcher/test_influxdb.py (97%) rename {tests => yardstick/tests}/unit/dispatcher/test_influxdb_line_protocol.py (98%) diff --git a/tests/unit/dispatcher/__init__.py b/yardstick/tests/unit/dispatcher/__init__.py similarity index 100% rename from tests/unit/dispatcher/__init__.py rename to yardstick/tests/unit/dispatcher/__init__.py diff --git a/tests/unit/dispatcher/test_influxdb.py b/yardstick/tests/unit/dispatcher/test_influxdb.py similarity index 97% rename from tests/unit/dispatcher/test_influxdb.py rename to yardstick/tests/unit/dispatcher/test_influxdb.py index 7ebe8c90b..bca94e385 100644 --- a/tests/unit/dispatcher/test_influxdb.py +++ b/yardstick/tests/unit/dispatcher/test_influxdb.py @@ -11,20 +11,15 @@ # Unittest for yardstick.dispatcher.influxdb -from __future__ import absolute_import +import mock import unittest +from yardstick.dispatcher.influxdb import InfluxdbDispatcher +from yardstick import _init_logging -try: - from unittest import mock -except ImportError: - import mock -from yardstick import _init_logging _init_logging() -from yardstick.dispatcher.influxdb import InfluxdbDispatcher - class InfluxdbDispatcherTestCase(unittest.TestCase): diff --git a/tests/unit/dispatcher/test_influxdb_line_protocol.py b/yardstick/tests/unit/dispatcher/test_influxdb_line_protocol.py similarity index 98% rename from tests/unit/dispatcher/test_influxdb_line_protocol.py rename to yardstick/tests/unit/dispatcher/test_influxdb_line_protocol.py index 51dc39e3c..641e97fae 100644 --- a/tests/unit/dispatcher/test_influxdb_line_protocol.py +++ b/yardstick/tests/unit/dispatcher/test_influxdb_line_protocol.py @@ -11,7 +11,6 @@ # yardstick comment: this file is a modified copy of # influxdb-python/influxdb/tests/test_line_protocol.py -from __future__ import absolute_import import unittest from third_party.influxdb.influxdb_line_protocol import make_lines -- 2.16.6