def METHOD_NAME(self, data, mock_db):
    current_config = data["current_config"]
    patch = jsonpatch.JsonPatch(data["patch"])
    expected_error_substrings = data["expected_error_substrings"]
    try:
        patch_applier = self.create_patch_applier(current_config)
        patch_applier.apply(patch)
        self.fail("An exception was supposed to be thrown")
    except Exception as ex:
        notfound_substrings = []
        error = str(ex)
        for substring in expected_error_substrings:
            if substring not in error:
                notfound_substrings.append(substring)
        if notfound_substrings:
            self.fail(f"Did not find the expected substrings {notfound_substrings} in the error: '{error}'")