mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-07-08 19:49:09 +00:00
consolidate output code in callbacks.py, from utils, remove extra functions
This commit is contained in:
parent
bc71c6ddd7
commit
867b2437cc
5 changed files with 70 additions and 85 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue