def load_opts_schemas(opts): paths = opts["<schemas>"] if not paths: return [] schemas = [] for p in paths: schemas += kson.load_schemas(p) return schemas
def load_opts_schemas(opts): paths = opts['<schemas>'] if not paths: return [] schemas = [] for p in paths: schemas += kson.load_schemas(p) return schemas
def test_load_file(): kson.load_schemas(FIXTURES_PATH + "movie_schemas.kson") movies = kson.load(FIXTURES_PATH + "movies.kson") assert data_eq(movies, MOVIE_DATA)
def test_multi_schema_loading(): kson.load_schemas(FIXTURES_PATH + "movie_schemas.kson") assert kson.SCHEMAS['movies-item'] == MOVIE_SCHEMAS[0] assert kson.SCHEMAS['movies-content'] == MOVIE_SCHEMAS[1] assert kson.SCHEMAS['movies-status'] == MOVIE_SCHEMAS[2] assert kson.SCHEMAS['movies'] == MOVIE_SCHEMAS[3]