summaryrefslogtreecommitdiff
path: root/tests.py
diff options
context:
space:
mode:
authorselurvedu <selurvedu@users.noreply.github.com>2015-08-19 17:00:16 +0000
committerselurvedu <selurvedu@users.noreply.github.com>2016-04-08 04:38:18 +0000
commitc1067351a798534dda59aadccdfe5eb96fd520b4 (patch)
tree3d07c730ea96752609debeeacfac7a8400081afc /tests.py
parent282bebae977021b6f1d19fad0c967eb625af7331 (diff)
downloadpython-json-patch-c1067351a798534dda59aadccdfe5eb96fd520b4.tar.gz
Allow longer patches in test_use_move_...
Diffstat (limited to 'tests.py')
-rwxr-xr-xtests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests.py b/tests.py
index bb9e296..c5134d3 100755
--- a/tests.py
+++ b/tests.py
@@ -329,8 +329,9 @@ class MakePatchTestCase(unittest.TestCase):
def test_use_move_instead_of_add_remove(self):
def fn(_src, _dst):
patch = list(jsonpatch.make_patch(_src, _dst))
- self.assertEqual(len(patch), 1)
- self.assertEqual(patch[0]['op'], 'move')
+ # Check if there are only 'move' operations
+ for p in patch:
+ self.assertEqual(p['op'], 'move')
res = jsonpatch.apply_patch(_src, patch)
self.assertEqual(res, _dst)