ext tests w/o result check if no exceptions raised

This commit is contained in:
Stefan Kögl
2012-12-21 10:19:46 +01:00
parent 682fc47b0e
commit ab691f2cce

View File

@@ -62,7 +62,11 @@ class TestCaseTemplate(unittest.TestCase):
else:
res = jsonpatch.apply_patch(test['doc'], test['patch'])
self.assertEquals(res, test['expected'])
# if there is no 'expected' we only verify that applying the patch
# does not raies an exception
if 'expected' in test:
self.assertEquals(res, test['expected'])
def make_test_case(tests):