From 03e7f54071b68428b4bb1879540c15834e4bbd10 Mon Sep 17 00:00:00 2001 From: Robin Roth Date: Sat, 14 May 2016 06:09:13 +0200 Subject: [PATCH] Don't use 'from ansible.module_utils import foo' style here as it breaks (#15756) py.test" --- test/units/module_utils/basic/test_run_command.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/units/module_utils/basic/test_run_command.py b/test/units/module_utils/basic/test_run_command.py index 35186e220e..0ba6f4cd16 100644 --- a/test/units/module_utils/basic/test_run_command.py +++ b/test/units/module_utils/basic/test_run_command.py @@ -30,8 +30,7 @@ from ansible.compat.tests.mock import call, MagicMock, Mock, patch, sentinel from units.mock.procenv import swap_stdin_and_argv -from ansible.module_utils import basic -from ansible.module_utils.basic import AnsibleModule +import ansible.module_utils.basic class OpenBytesIO(BytesIO): """BytesIO with dummy close() method @@ -67,8 +66,8 @@ class TestAnsibleModuleRunCommand(unittest.TestCase): self.stdin_swap = swap_stdin_and_argv(stdin_data=args) self.stdin_swap.__enter__() - basic._ANSIBLE_ARGS = None - self.module = AnsibleModule(argument_spec=dict()) + ansible.module_utils.basic._ANSIBLE_ARGS = None + self.module = ansible.module_utils.basic.AnsibleModule(argument_spec=dict()) self.module.fail_json = MagicMock(side_effect=SystemExit) self.os = patch('ansible.module_utils.basic.os').start()