# Path: inspire_schemas/api.py



import json
import os
import jsonschema
import pytest
import six
from inspire_schemas import api
    example_path = os.path.join(FIXTURES_PATH, schema_name + '_example.json')
    with open(example_path) as example_fd:
        data = json.loads(example_fd.read())

    return data


def change_something(data):
    for key, elem in data.items():
        if isinstance(elem, int):
            data[key] = (
                "Look, I'm a knight, I'm supposed to get as much peril as I"
                " can."
            )
        else:
            data[key] = 42
        break
    else:
        raise Exception('Unable to change anythng on data "%s"' % data)

    return data


@pytest.mark.parametrize(
    'schema_name',
    get_schema_names(FIXTURES_PATH),
    ids=get_schema_names(FIXTURES_PATH),
)
def test_schemas_validate(schema_name):
    example_data = load_example(schema_name)

# Path: inspire_schemas/api.py



# Path: tests/integration/test_validate.py
import json
import os
import jsonschema
import pytest
import six
from inspire_schemas import api

    example_path = os.path.join(FIXTURES_PATH, schema_name + '_example.json')
    with open(example_path) as example_fd:
        data = json.loads(example_fd.read())

    return data


def change_something(data):
    for key, elem in data.items():
        if isinstance(elem, int):
            data[key] = (
                "Look, I'm a knight, I'm supposed to get as much peril as I"
                " can."
            )
        else:
            data[key] = 42
        break
    else:
        raise Exception('Unable to change anythng on data "%s"' % data)

    return data


@pytest.mark.parametrize(
    'schema_name',
    get_schema_names(FIXTURES_PATH),
    ids=get_schema_names(FIXTURES_PATH),
)
def test_schemas_validate(schema_name):
    example_data = load_example(schema_name)

    api.validate(data=example_data, schema=schema_name)