add test for replacing missing obj
This commit is contained in:
6
tests.py
6
tests.py
@@ -323,6 +323,12 @@ 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_missing(self):
|
||||
src = {"foo": 1}
|
||||
patch_obj = [ { "op": "replace", "path": "/bar", "value": 10} ]
|
||||
self.assertRaises(jsonpatch.JsonPatchConflict, jsonpatch.apply_patch, src, patch_obj)
|
||||
|
||||
|
||||
|
||||
modules = ['jsonpatch']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user