summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kögl <stefan@skoegl.net>2013-07-12 16:18:08 +0200
committerStefan Kögl <stefan@skoegl.net>2013-07-12 16:18:08 +0200
commit0286a4e6691907f70afd74c5d417c0c525c2451e (patch)
tree0bf9e1450a19491f4b4379a272af55e175d99c44
parentc6a90a623357efe85f28eca681eb0b7bf21520b8 (diff)
downloadpython-json-patch-0286a4e6691907f70afd74c5d417c0c525c2451e.tar.gz
test equality of patch operations to other objs
-rwxr-xr-xtests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests.py b/tests.py
index 8e1b22e..266ed2a 100755
--- a/tests.py
+++ b/tests.py
@@ -193,6 +193,12 @@ class EqualityTestCase(unittest.TestCase):
self.assertFalse(patch == p)
self.assertFalse(patch == None)
+ # also a patch operation will always compare
+ # not-equal to objects of other types
+ op = jsonpatch.PatchOperation(p[0])
+ self.assertFalse(op == p[0])
+ self.assertFalse(op == None)
+
def test_str(self):
patch_obj = [ { "op": "add", "path": "/child", "value": { "grandchild": { } } } ]
patch = jsonpatch.JsonPatch(patch_obj)