diff options
author | Stefan Kögl <stefan@skoegl.net> | 2021-03-29 22:06:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 22:06:00 +0200 |
commit | a6526489c4b741e1b603b5bb988ecc9aefd3e880 (patch) | |
tree | 80c5d507a176ace16f23ccc6be3effce91c01064 /tests.py | |
parent | 55d4816975350ea3f683814f4d025951ddfb1693 (diff) | |
parent | c9bfb91727690d6c7249b9250aba8942613f3f1c (diff) | |
download | python-json-patch-a6526489c4b741e1b603b5bb988ecc9aefd3e880.tar.gz |
Merge pull request #132 from JulienPalard/mdk/TypeError
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, |