diff options
Diffstat (limited to 'tests.py')
-rwxr-xr-x | tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -602,6 +602,11 @@ class ConflictTests(unittest.TestCase): patch_obj = [ { "op": "replace", "path": "/foo/10", "value": 10} ] self.assertRaises(jsonpatch.JsonPatchConflict, jsonpatch.apply_patch, src, patch_obj) + def test_replace_oob_length(self): + src = {"foo": [0, 1]} + patch_obj = [ { "op": "replace", "path": "/foo/2", "value": 2} ] + self.assertRaises(jsonpatch.JsonPatchConflict, jsonpatch.apply_patch, src, patch_obj) + def test_replace_missing(self): src = {"foo": 1} patch_obj = [ { "op": "replace", "path": "/bar", "value": 10} ] |