mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
consolidate output code in callbacks.py, from utils, remove extra functions
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user