From 264273864621e82a6c2caeb061782ffd70f10f9d Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 18 Feb 2015 12:09:22 -0500 Subject: [PATCH] changed jsonify test to ignore whitespace --- test/units/TestUtils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/units/TestUtils.py b/test/units/TestUtils.py index 7dd1e751cc9..80c290a9be8 100644 --- a/test/units/TestUtils.py +++ b/test/units/TestUtils.py @@ -182,8 +182,8 @@ class TestUtils(unittest.TestCase): def test_jsonify(self): self.assertEqual(ansible.utils.jsonify(None), '{}') self.assertEqual(ansible.utils.jsonify(dict(foo='bar', baz=['qux'])), '{"baz": ["qux"], "foo": "bar"}') - expected = u'{\n "baz": [\n "qux"\n ],\n "foo": "bar"\n}' - self.assertEqual(ansible.utils.jsonify(dict(foo='bar', baz=['qux']), format=True), expected) + expected = u'{"baz":["qux"],"foo":"bar"}' + self.assertEqual("".join(ansible.utils.jsonify(dict(foo='bar', baz=['qux']), format=True).split()), expected) def test_is_failed(self): self.assertEqual(ansible.utils.is_failed(dict(rc=0)), False)