Files
edu-industry/admin-tools/crawler/tests/test_schema_packaging.py
T
lofyerandfactory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> 8dff9847e3 feat: add compliant data connectors and lineage
- add authorized nine-source crawler connectors with security controls and packaged schemas
- add the school internship contract to the vendor data standard center
- add bidirectional campus data-to-report lineage with gap ownership and remediation

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-08-24 16:28:01 +08:00

23 lines
723 B
Python

import json
from importlib.resources import files
from pathlib import Path
from jsonschema import Draft202012Validator
SCHEMA_NAMES = (
"external-job-source.schema.json",
"school-employment.schema.json",
"school-internship.schema.json",
)
def test_packaged_schemas_match_canonical_demo_contracts() -> None:
canonical_directory = Path(__file__).resolve().parents[2] / "demo" / "schemas"
for name in SCHEMA_NAMES:
canonical = json.loads((canonical_directory / name).read_text())
packaged = json.loads(
files("edu_crawler.schemas").joinpath(name).read_text(encoding="utf-8")
)
assert packaged == canonical
Draft202012Validator.check_schema(packaged)