How to use the jsonpatch.json.load function in jsonpatch

To help you get started, we’ve selected a few jsonpatch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stefankoegl / python-json-patch / ext_tests.py View on Github external
def get_suite(filenames):
    suite = unittest.TestSuite()

    for testfile in filenames:
        with open(testfile) as f:
            # we use the (potentially) patched version of json.load here
            tests = jsonpatch.json.load(f)
            cls = make_test_case(tests)
            suite.addTest(unittest.makeSuite(cls))

    return suite