From 5cdb066ab6bfd0f28e7bd78a61f13bf4ff90d00d Mon Sep 17 00:00:00 2001 From: Bock Date: Thu, 11 Mar 2021 17:15:15 -0700 Subject: closes #129 --- tests.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests.py') diff --git a/tests.py b/tests.py index a56ffc0..8a638cf 100755 --- a/tests.py +++ b/tests.py @@ -481,6 +481,15 @@ class MakePatchTestCase(unittest.TestCase): self.assertEqual(res, dst) self.assertIsInstance(res['A'], bool) + def test_issue129(self): + """In JSON 1 is different from True even though in python 1 == True Take Two""" + src = {'A': {'D': 1.0}, 'B': {'E': 'a'}} + dst = {'A': {'C': 'a'}, 'B': {'C': True}} + patch = jsonpatch.make_patch(src, dst) + res = jsonpatch.apply_patch(src, patch) + self.assertEqual(res, dst) + self.assertIsInstance(res['B']['C'], bool) + def test_issue103(self): """In JSON 1 is different from 1.0 even though in python 1 == 1.0""" src = {'A': 1} -- cgit v1.2.1