mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #10264 from bcoca/jsonify_test_fix
fixed jsonify test
This commit is contained in:
commit
2b037400ad
1 changed files with 2 additions and 8 deletions
|
@ -181,14 +181,8 @@ class TestUtils(unittest.TestCase):
|
||||||
|
|
||||||
def test_jsonify(self):
|
def test_jsonify(self):
|
||||||
self.assertEqual(ansible.utils.jsonify(None), '{}')
|
self.assertEqual(ansible.utils.jsonify(None), '{}')
|
||||||
self.assertEqual(ansible.utils.jsonify(dict(foo='bar', baz=['qux'])),
|
self.assertEqual(ansible.utils.jsonify(dict(foo='bar', baz=['qux'])), '{"baz": ["qux"], "foo": "bar"}')
|
||||||
'{"baz": ["qux"], "foo": "bar"}')
|
expected = u'{\n "baz": [\n "qux"\n ],\n "foo": "bar"\n}'
|
||||||
expected = '''{
|
|
||||||
"baz": [
|
|
||||||
"qux"
|
|
||||||
],
|
|
||||||
"foo": "bar"
|
|
||||||
}'''
|
|
||||||
self.assertEqual(ansible.utils.jsonify(dict(foo='bar', baz=['qux']), format=True), expected)
|
self.assertEqual(ansible.utils.jsonify(dict(foo='bar', baz=['qux']), format=True), expected)
|
||||||
|
|
||||||
def test_is_failed(self):
|
def test_is_failed(self):
|
||||||
|
|
Loading…
Reference in a new issue