consolidate output code in callbacks.py, from utils, remove extra functions

This commit is contained in:
Michael DeHaan
2012-07-15 10:12:49 -04:00
parent bc71c6ddd7
commit 867b2437cc
5 changed files with 70 additions and 85 deletions

View File

@@ -138,7 +138,6 @@ class TestPlaybook(unittest.TestCase):
runner_callbacks = self.test_callbacks
)
result = self.playbook.run()
# print utils.bigjson(dict(events=EVENTS))
return result
def test_one(self):
@@ -147,7 +146,7 @@ class TestPlaybook(unittest.TestCase):
# if different, this will output to screen
print "**ACTUAL**"
print utils.bigjson(actual)
print utils.jsonify(actual, format=True)
expected = {
"127.0.0.2": {
"changed": 9,
@@ -158,8 +157,9 @@ class TestPlaybook(unittest.TestCase):
}
}
print "**EXPECTED**"
print utils.bigjson(expected)
assert utils.bigjson(expected) == utils.bigjson(actual)
print utils.jsonify(expected, format=True)
assert utils.jsonify(expected, format=True) == utils.jsonify(actual,format=True)
# make sure the template module took options from the vars section
data = file('/tmp/ansible_test_data_template.out').read()