From 0828028c71bb5273a6796c0c47f93cf23b818471 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Fri, 29 May 2015 00:15:14 -0500 Subject: [PATCH] Fixing unit test for included file changes --- test/units/plugins/strategies/test_strategy_base.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/units/plugins/strategies/test_strategy_base.py b/test/units/plugins/strategies/test_strategy_base.py index 7d8cb42ee6e..4c177f73434 100644 --- a/test/units/plugins/strategies/test_strategy_base.py +++ b/test/units/plugins/strategies/test_strategy_base.py @@ -299,14 +299,17 @@ class TestStrategyBase(unittest.TestCase): mock_task._block = mock_block mock_task._role = None + mock_iterator = MagicMock() + mock_iterator.mark_host_failed.return_value = None + mock_inc_file = MagicMock() mock_inc_file._task = mock_task mock_inc_file._filename = "test.yml" - res = strategy_base._load_included_file(included_file=mock_inc_file) + res = strategy_base._load_included_file(included_file=mock_inc_file, iterator=mock_iterator) mock_inc_file._filename = "bad.yml" - self.assertRaises(AnsibleParserError, strategy_base._load_included_file, included_file=mock_inc_file) + self.assertRaises(AnsibleParserError, strategy_base._load_included_file, included_file=mock_inc_file, iterator=mock_iterator) def test_strategy_base_run_handlers(self): workers = []