diff options
author | Stefan Kögl <stefan@skoegl.net> | 2013-07-12 16:18:08 +0200 |
---|---|---|
committer | Stefan Kögl <stefan@skoegl.net> | 2013-07-12 16:18:08 +0200 |
commit | 0286a4e6691907f70afd74c5d417c0c525c2451e (patch) | |
tree | 0bf9e1450a19491f4b4379a272af55e175d99c44 | |
parent | c6a90a623357efe85f28eca681eb0b7bf21520b8 (diff) | |
download | python-json-patch-0286a4e6691907f70afd74c5d417c0c525c2451e.tar.gz |
test equality of patch operations to other objs
-rwxr-xr-x | tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |