summaryrefslogtreecommitdiff
path: root/test/units/plugins
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2016-04-12 15:31:43 -0500
committerMatt Martz <matt@sivel.net>2016-05-12 12:25:09 -0500
commit3466e73c504b81d472809001a4d5c5df5f7f6172 (patch)
tree22cb1990f7b1fe07fc433684011df55d1a1a9e24 /test/units/plugins
parenta4d2238e502a5d0d8b7d31f80198c21859a44212 (diff)
downloadansible-3466e73c504b81d472809001a4d5c5df5f7f6172.tar.gz
Resolve test failures
Diffstat (limited to 'test/units/plugins')
-rw-r--r--test/units/plugins/action/test_action.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/units/plugins/action/test_action.py b/test/units/plugins/action/test_action.py
index 2a9bb55693..62e4744cf8 100644
--- a/test/units/plugins/action/test_action.py
+++ b/test/units/plugins/action/test_action.py
@@ -217,7 +217,7 @@ class TestActionBase(unittest.TestCase):
with patch.object(os, 'rename') as m:
mock_task.args = dict(a=1, foo='fö〩')
mock_connection.module_implementation_preferences = ('',)
- (style, shebang, data) = action_base._configure_module(mock_task.action, mock_task.args)
+ (style, shebang, data, module_path, is_binary) = action_base._configure_module(mock_task.action, mock_task.args)
self.assertEqual(style, "new")
self.assertEqual(shebang, b"#!/usr/bin/python")
@@ -229,7 +229,7 @@ class TestActionBase(unittest.TestCase):
mock_task.action = 'win_copy'
mock_task.args = dict(b=2)
mock_connection.module_implementation_preferences = ('.ps1',)
- (style, shebang, data) = action_base._configure_module('stat', mock_task.args)
+ (style, shebang, data, module_path, is_binary) = action_base._configure_module('stat', mock_task.args)
self.assertEqual(style, "new")
self.assertEqual(shebang, None)
@@ -572,7 +572,7 @@ class TestActionBase(unittest.TestCase):
action_base._low_level_execute_command = MagicMock()
action_base._fixup_perms = MagicMock()
- action_base._configure_module.return_value = ('new', '#!/usr/bin/python', 'this is the module data')
+ action_base._configure_module.return_value = ('new', '#!/usr/bin/python', 'this is the module data', None, False)
action_base._late_needs_tmp_path.return_value = False
action_base._compute_environment_string.return_value = ''
action_base._connection.has_pipelining = True
@@ -581,12 +581,12 @@ class TestActionBase(unittest.TestCase):
self.assertEqual(action_base._execute_module(module_name='foo', module_args=dict(z=9, y=8, x=7), task_vars=dict(a=1)), dict(rc=0, stdout="ok", stdout_lines=['ok']))
# test with needing/removing a remote tmp path
- action_base._configure_module.return_value = ('old', '#!/usr/bin/python', 'this is the module data')
+ action_base._configure_module.return_value = ('old', '#!/usr/bin/python', 'this is the module data', None, False)
action_base._late_needs_tmp_path.return_value = True
action_base._make_tmp_path.return_value = '/the/tmp/path'
self.assertEqual(action_base._execute_module(), dict(rc=0, stdout="ok", stdout_lines=['ok']))
- action_base._configure_module.return_value = ('non_native_want_json', '#!/usr/bin/python', 'this is the module data')
+ action_base._configure_module.return_value = ('non_native_want_json', '#!/usr/bin/python', 'this is the module data', None, False)
self.assertEqual(action_base._execute_module(), dict(rc=0, stdout="ok", stdout_lines=['ok']))
play_context.become = True
@@ -594,14 +594,14 @@ class TestActionBase(unittest.TestCase):
self.assertEqual(action_base._execute_module(), dict(rc=0, stdout="ok", stdout_lines=['ok']))
# test an invalid shebang return
- action_base._configure_module.return_value = ('new', '', 'this is the module data')
+ action_base._configure_module.return_value = ('new', '', 'this is the module data', None, False)
action_base._late_needs_tmp_path.return_value = False
self.assertRaises(AnsibleError, action_base._execute_module)
# test with check mode enabled, once with support for check
# mode and once with support disabled to raise an error
play_context.check_mode = True
- action_base._configure_module.return_value = ('new', '#!/usr/bin/python', 'this is the module data')
+ action_base._configure_module.return_value = ('new', '#!/usr/bin/python', 'this is the module data', None, False)
self.assertEqual(action_base._execute_module(), dict(rc=0, stdout="ok", stdout_lines=['ok']))
action_base._supports_check_mode = False
self.assertRaises(AnsibleError, action_base._execute_module)