Fix make_patch with unicode paths

This commit is contained in:
Stefan Kögl
2015-05-07 18:08:37 +02:00
parent 50a5e0d7e3
commit 5d1980dec7
2 changed files with 9 additions and 1 deletions

View File

@@ -1 +1 @@
jsonpointer>=1.5
jsonpointer>=1.9

View File

@@ -351,6 +351,14 @@ class MakePatchTestCase(unittest.TestCase):
res = patch.apply(src)
self.assertEqual(res, dst)
def test_make_patch_unicode(self):
""" Test if unicode keys and values are handled correctly """
src = {}
dst = {u'\xee': u'\xee'}
patch = jsonpatch.make_patch(src, dst)
res = patch.apply(src)
self.assertEqual(res, dst)
class InvalidInputTests(unittest.TestCase):