diff options
author | Stefan Kögl <stefan@skoegl.net> | 2021-03-13 20:11:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-13 20:11:40 +0100 |
commit | ce15b237efb885b0861ba4cfaf2957e591f8cb57 (patch) | |
tree | dadc82e6ef8dab9da51dc9adf110c57d06b9372f /tests.py | |
parent | 7a6d76ada4b990b1951831a42a08924de5775c2d (diff) | |
parent | 5cdb066ab6bfd0f28e7bd78a61f13bf4ff90d00d (diff) | |
download | python-json-patch-ce15b237efb885b0861ba4cfaf2957e591f8cb57.tar.gz |
Merge pull request #130 from Penguin2600/master
Closes #129
Diffstat (limited to 'tests.py')
-rwxr-xr-x | tests.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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} |