Update unit tests for flush_handlers fix

This commit is contained in:
James Cammarata 2015-07-22 11:30:05 -04:00
commit 993ce592b1
2 changed files with 29 additions and 9 deletions

View file

@ -117,7 +117,7 @@ class TestPlay(unittest.TestCase):
roles=['foo'],
), loader=fake_loader)
tasks = p.compile()
blocks = p.compile()
def test_play_compile(self):
p = Play.load(dict(
@ -127,6 +127,8 @@ class TestPlay(unittest.TestCase):
tasks=[dict(action='shell echo "hello world"')],
))
tasks = p.compile()
self.assertEqual(len(tasks), 1)
self.assertIsInstance(tasks[0], Block)
blocks = p.compile()
# with a single block, there will still be three
# implicit meta flush_handler blocks inserted
self.assertEqual(len(blocks), 4)