1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix strategy base unit tests after 88e1ef8

This commit is contained in:
James Cammarata 2015-07-24 10:53:54 -04:00
parent e526743b4f
commit 8146a193eb

View file

@ -41,6 +41,7 @@ class TestStrategyBase(unittest.TestCase):
def test_strategy_base_init(self): def test_strategy_base_init(self):
mock_tqm = MagicMock(TaskQueueManager) mock_tqm = MagicMock(TaskQueueManager)
mock_tqm._final_q = MagicMock() mock_tqm._final_q = MagicMock()
mock_tqm._options = MagicMock()
strategy_base = StrategyBase(tqm=mock_tqm) strategy_base = StrategyBase(tqm=mock_tqm)
def test_strategy_base_run(self): def test_strategy_base_run(self):
@ -57,6 +58,7 @@ class TestStrategyBase(unittest.TestCase):
mock_tqm._failed_hosts = dict() mock_tqm._failed_hosts = dict()
mock_tqm._unreachable_hosts = dict() mock_tqm._unreachable_hosts = dict()
mock_tqm._options = MagicMock()
strategy_base = StrategyBase(tqm=mock_tqm) strategy_base = StrategyBase(tqm=mock_tqm)
self.assertEqual(strategy_base.run(iterator=mock_iterator, play_context=mock_play_context), 0) self.assertEqual(strategy_base.run(iterator=mock_iterator, play_context=mock_play_context), 0)