summaryrefslogtreecommitdiff
path: root/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests.py')
-rwxr-xr-xtests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests.py b/tests.py
index 8a638cf..797c220 100755
--- a/tests.py
+++ b/tests.py
@@ -190,6 +190,12 @@ class ApplyPatchTestCase(unittest.TestCase):
obj, [{'op': 'test', 'path': '/baz', 'value': 'bar'}])
+ def test_forgetting_surrounding_list(self):
+ obj = {'bar': 'qux'}
+ self.assertRaises(jsonpatch.InvalidJsonPatch,
+ jsonpatch.apply_patch,
+ obj, {'op': 'test', 'path': '/bar'})
+
def test_test_noval_existing(self):
obj = {'bar': 'qux'}
self.assertRaises(jsonpatch.InvalidJsonPatch,