diff options
author | Stefan Kögl <stefan@skoegl.net> | 2013-07-12 19:46:57 +0200 |
---|---|---|
committer | Stefan Kögl <stefan@skoegl.net> | 2013-07-12 19:46:57 +0200 |
commit | 7d0e0faeedbff07a597409be4e5607547944242b (patch) | |
tree | f96222f623ab16bf5da15b686ce618fb1174787f | |
parent | bdd3689fbd8aa30e1770c676de91047bc4883e6c (diff) | |
download | python-json-patch-7d0e0faeedbff07a597409be4e5607547944242b.tar.gz |
add test for replacing missing obj
-rwxr-xr-x | tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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'] |