summaryrefslogtreecommitdiff
path: root/tests.py
diff options
context:
space:
mode:
authorStefan Kögl <stefan@skoegl.net>2015-05-07 18:08:37 +0200
committerStefan Kögl <stefan@skoegl.net>2015-05-07 18:08:37 +0200
commit5d1980dec71a51f61dd1629b283af1f6b2b7c47b (patch)
treec13a03e9566b017613f1fab8a2787ec6eaa39baf /tests.py
parent50a5e0d7e36bc9aaa8f863ca28fc59f147de7949 (diff)
downloadpython-json-patch-5d1980dec71a51f61dd1629b283af1f6b2b7c47b.tar.gz
Fix make_patch with unicode paths
Diffstat (limited to 'tests.py')
-rwxr-xr-xtests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests.py b/tests.py
index 5b0d9e9..071aee0 100755
--- a/tests.py
+++ b/tests.py
@@ -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):