diff options
author | Stefan Kögl <stefan@skoegl.net> | 2013-07-09 12:49:02 +0200 |
---|---|---|
committer | Stefan Kögl <stefan@skoegl.net> | 2013-07-09 12:49:02 +0200 |
commit | e5a45bf5841f9f959fb13b9907a89d65fa275f0f (patch) | |
tree | b73661118d31e5e406ef95d066c46fd053a5f4b5 /tests.py | |
parent | 4ed55a3fb5e85ccf95ffa0f505c72af5b4bb447d (diff) | |
download | python-json-patch-e5a45bf5841f9f959fb13b9907a89d65fa275f0f.tar.gz |
add test for comparing patches to other types
Diffstat (limited to 'tests.py')
-rwxr-xr-x | tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -185,6 +185,13 @@ class EqualityTestCase(unittest.TestCase): self.assertNotEqual(hash(patch1), hash(patch2)) + def test_patch_neq_other_objs(self): + p = [{'op': 'test', 'path': '/test'}] + patch = jsonpatch.JsonPatch(p) + # a patch will always compare not-equal to objects of other types + self.assertFalse(patch == p) + self.assertFalse(patch == None) + |