Spaces:
Running
Running
| import json | |
| from pathlib import Path | |
| from toxra_core.regulatory_mapper import map_extraction_to_framework | |
| def test_regulatory_mapping_outputs_matrix_and_report(): | |
| fixture = Path("tests/fixtures/extraction_sample.json") | |
| payload = json.loads(fixture.read_text(encoding="utf-8")) | |
| df, report, md = map_extraction_to_framework(payload, framework="FDA CTP") | |
| assert not df.empty | |
| assert "clause_id" in df.columns | |
| assert report["framework"] == "FDA CTP" | |
| assert "Status Summary" in md | |