Skip to content

Commit 5d1980d

Browse files
committed
Fix make_patch with unicode paths
1 parent 50a5e0d commit 5d1980d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
jsonpointer>=1.5
1+
jsonpointer>=1.9

tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,14 @@ def test_root_list(self):
351351
res = patch.apply(src)
352352
self.assertEqual(res, dst)
353353

354+
def test_make_patch_unicode(self):
355+
""" Test if unicode keys and values are handled correctly """
356+
src = {}
357+
dst = {u'\xee': u'\xee'}
358+
patch = jsonpatch.make_patch(src, dst)
359+
res = patch.apply(src)
360+
self.assertEqual(res, dst)
361+
354362

355363
class InvalidInputTests(unittest.TestCase):
356364

0 commit comments

Comments
 (0)