diff options
author | Julien Palard <julien@palard.fr> | 2021-03-16 15:33:47 +0100 |
---|---|---|
committer | Julien Palard <julien@palard.fr> | 2021-03-21 18:40:19 +0100 |
commit | c9bfb91727690d6c7249b9250aba8942613f3f1c (patch) | |
tree | 80c5d507a176ace16f23ccc6be3effce91c01064 /tests.py | |
parent | 55d4816975350ea3f683814f4d025951ddfb1693 (diff) | |
download | python-json-patch-c9bfb91727690d6c7249b9250aba8942613f3f1c.tar.gz |
FIX: TypeError when one forgot to put its operation in a list.
Diffstat (limited to 'tests.py')
-rwxr-xr-x | tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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, |