Fix lookup plugin test properly

parent e3f7f86a
...@@ -114,6 +114,7 @@ class TestPlaybook(unittest.TestCase): ...@@ -114,6 +114,7 @@ class TestPlaybook(unittest.TestCase):
def _run(self, test_playbook, host_list='test/ansible_hosts'): def _run(self, test_playbook, host_list='test/ansible_hosts'):
''' run a module and get the localhost results ''' ''' run a module and get the localhost results '''
# This ensures tests are independent of eachother # This ensures tests are independent of eachother
global EVENTS
ansible.playbook.SETUP_CACHE.clear() ansible.playbook.SETUP_CACHE.clear()
EVENTS = [] EVENTS = []
...@@ -202,7 +203,8 @@ class TestPlaybook(unittest.TestCase): ...@@ -202,7 +203,8 @@ class TestPlaybook(unittest.TestCase):
assert utils.jsonify(expected, format=True) == utils.jsonify(actual,format=True) assert utils.jsonify(expected, format=True) == utils.jsonify(actual,format=True)
assert len(EVENTS) == 60 print "len(EVENTS) = %d" % len(EVENTS)
assert len(EVENTS) == 26
def test_includes(self): def test_includes(self):
pb = os.path.join(self.test_dir, 'playbook-includer.yml') pb = os.path.join(self.test_dir, 'playbook-includer.yml')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment