From d57f09298d39ab9899f9c2de4bc4168497e0e321 Mon Sep 17 00:00:00 2001 From: Jiri Podivin Date: Thu, 17 Jun 2021 08:31:32 +0200 Subject: [PATCH] Removing superfluous imports from tests Several unnecessary imports were removed from test modules. Imports of the validations_common.tests.fakes were kept. Signed-off-by: Jiri Podivin Change-Id: I8d6d5057fa08be1ccd84c01837d6e4c93ce01b89 --- .../tests/callback_plugins/test_fail_if_no_hosts.py | 1 - .../tests/callback_plugins/test_validation_json.py | 1 - .../tests/callback_plugins/test_validation_output.py | 1 - .../tests/callback_plugins/test_validation_stdout.py | 2 -- validations_common/tests/library/test_check_package_update.py | 2 -- 5 files changed, 7 deletions(-) diff --git a/validations_common/tests/callback_plugins/test_fail_if_no_hosts.py b/validations_common/tests/callback_plugins/test_fail_if_no_hosts.py index 35046ff..3f693db 100644 --- a/validations_common/tests/callback_plugins/test_fail_if_no_hosts.py +++ b/validations_common/tests/callback_plugins/test_fail_if_no_hosts.py @@ -27,7 +27,6 @@ except ImportError: from validations_common.tests import base from validations_common.tests import fakes -import validations_common.library.reportentry as validation from validations_common.callback_plugins import fail_if_no_hosts from ansible.plugins.callback import CallbackBase diff --git a/validations_common/tests/callback_plugins/test_validation_json.py b/validations_common/tests/callback_plugins/test_validation_json.py index 6bd2def..ccc2308 100644 --- a/validations_common/tests/callback_plugins/test_validation_json.py +++ b/validations_common/tests/callback_plugins/test_validation_json.py @@ -34,7 +34,6 @@ from ansible.parsing.ajson import AnsibleJSONEncoder from ansible.playbook import Playbook from ansible.plugins.callback import CallbackBase -import validations_common.library.reportentry as validation from validations_common.callback_plugins import validation_json diff --git a/validations_common/tests/callback_plugins/test_validation_output.py b/validations_common/tests/callback_plugins/test_validation_output.py index 4323bf0..9f28056 100644 --- a/validations_common/tests/callback_plugins/test_validation_output.py +++ b/validations_common/tests/callback_plugins/test_validation_output.py @@ -29,7 +29,6 @@ from validations_common.tests import fakes from ansible.plugins.callback import CallbackBase -import validations_common.library.reportentry as validation from validations_common.callback_plugins import validation_output diff --git a/validations_common/tests/callback_plugins/test_validation_stdout.py b/validations_common/tests/callback_plugins/test_validation_stdout.py index 2633713..20e14c1 100644 --- a/validations_common/tests/callback_plugins/test_validation_stdout.py +++ b/validations_common/tests/callback_plugins/test_validation_stdout.py @@ -19,7 +19,6 @@ test_validation_stdout Tests for `validation_stdout` callback plugin. """ -import os import re try: @@ -30,7 +29,6 @@ except ImportError: from validations_common.tests import base from validations_common.tests import fakes -import validations_common.library.reportentry as validation from validations_common.callback_plugins import validation_stdout from ansible.plugins.callback import CallbackBase diff --git a/validations_common/tests/library/test_check_package_update.py b/validations_common/tests/library/test_check_package_update.py index 2d40d15..cc562e8 100644 --- a/validations_common/tests/library/test_check_package_update.py +++ b/validations_common/tests/library/test_check_package_update.py @@ -20,8 +20,6 @@ except ImportError: from validations_common.tests import base from validations_common.tests import fakes -import subprocess - from validations_common.library import check_package_update as cppkg PKG_INSTALLED = "foo-package|6.1.5|1|x86_64"