From c56e3aabfb9014e15e81cacb3a98175087a34aaa Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 29 Feb 2016 15:08:59 -0500 Subject: [PATCH] Clean up jsonify unit test with format to remove json lib differences --- test/units/parsing/utils/test_jsonify.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/units/parsing/utils/test_jsonify.py b/test/units/parsing/utils/test_jsonify.py index f1cf36ad50..4de92b8bad 100644 --- a/test/units/parsing/utils/test_jsonify.py +++ b/test/units/parsing/utils/test_jsonify.py @@ -28,7 +28,9 @@ class TestJsonify(unittest.TestCase): self.assertEqual(jsonify(dict(a=1, b=2, c=3)), '{"a": 1, "b": 2, "c": 3}') def test_jsonify_simple_format(self): - self.assertEqual(jsonify(dict(a=1, b=2, c=3), format=True), '{\n "a": 1, \n "b": 2, \n "c": 3\n}') + res = jsonify(dict(a=1, b=2, c=3), format=True) + cleaned = "".join([x.strip() for x in res.splitlines()]) + self.assertEqual(cleaned, '{"a": 1,"b": 2,"c": 3}') def test_jsonify_unicode(self): self.assertEqual(jsonify(dict(toshio=u'くらとみ')), u'{"toshio": "くらとみ"}')