diff options
author | Nathaniel Case <ncase@redhat.com> | 2020-01-31 12:49:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-31 12:49:37 -0500 |
commit | 3dbc03d58a9dc17d3bb11873b026eeb3f001564b (patch) | |
tree | 9224b0061dc89a67a7dd95ca92cd34b8cc5fdeab /test | |
parent | 725bb4d1739c75a023b4987f79f1739b1a854b95 (diff) | |
download | ansible-3dbc03d58a9dc17d3bb11873b026eeb3f001564b.tar.gz |
Try to load action plugin from the same collection as the module (#66701)
* Try to load network action plugin from the same collection as the module
* Alter tests to match
Just make sure the action plugin is as qualified as the module it is paired with
Diffstat (limited to 'test')
-rw-r--r-- | test/units/executor/test_task_executor.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/units/executor/test_task_executor.py b/test/units/executor/test_task_executor.py index 4dbce95512..0ae7995a8d 100644 --- a/test/units/executor/test_task_executor.py +++ b/test/units/executor/test_task_executor.py @@ -393,7 +393,7 @@ class TestTaskExecutor(unittest.TestCase): mock_connection = MagicMock() mock_templar = MagicMock() - action = 'namespace.prefix_sufix' + action = 'namespace.prefix_suffix' te._task.action = action handler = te._get_action_handler(mock_connection, mock_templar) @@ -428,8 +428,8 @@ class TestTaskExecutor(unittest.TestCase): mock_connection = MagicMock() mock_templar = MagicMock() - action = 'namespace.netconf_sufix' - module_prefix = action.split('.')[-1].split('_')[0] + action = 'namespace.netconf_suffix' + module_prefix = action.split('_')[0] te._task.action = action handler = te._get_action_handler(mock_connection, mock_templar) @@ -439,7 +439,7 @@ class TestTaskExecutor(unittest.TestCase): mock.call(module_prefix, collection_list=te._task.collections)]) action_loader.get.assert_called_once_with( - 'netconf', task=te._task, connection=mock_connection, + module_prefix, task=te._task, connection=mock_connection, play_context=te._play_context, loader=te._loader, templar=mock_templar, shared_loader_obj=te._shared_loader_obj, collection_list=te._task.collections) @@ -463,8 +463,8 @@ class TestTaskExecutor(unittest.TestCase): mock_connection = MagicMock() mock_templar = MagicMock() - action = 'namespace.prefix_sufix' - module_prefix = action.split('.')[-1].split('_')[0] + action = 'namespace.prefix_suffix' + module_prefix = action.split('_')[0] te._task.action = action handler = te._get_action_handler(mock_connection, mock_templar) |