Fixing unit test for included file changes
This commit is contained in:
parent
7985d2a8be
commit
0828028c71
1 changed files with 5 additions and 2 deletions
|
@ -299,14 +299,17 @@ class TestStrategyBase(unittest.TestCase):
|
||||||
mock_task._block = mock_block
|
mock_task._block = mock_block
|
||||||
mock_task._role = None
|
mock_task._role = None
|
||||||
|
|
||||||
|
mock_iterator = MagicMock()
|
||||||
|
mock_iterator.mark_host_failed.return_value = None
|
||||||
|
|
||||||
mock_inc_file = MagicMock()
|
mock_inc_file = MagicMock()
|
||||||
mock_inc_file._task = mock_task
|
mock_inc_file._task = mock_task
|
||||||
|
|
||||||
mock_inc_file._filename = "test.yml"
|
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"
|
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):
|
def test_strategy_base_run_handlers(self):
|
||||||
workers = []
|
workers = []
|
||||||
|
|
Loading…
Reference in a new issue