27 lines
1.2 KiB
Python
27 lines
1.2 KiB
Python
from review_agent.regulatory_review.services.rule_loader import load_rule_file
|
||
from review_agent.regulatory_review.services.structure_check import run_structure_check
|
||
|
||
|
||
def test_structure_check_reports_missing_instruction_sections():
|
||
document_texts = {
|
||
"说明书.docx": "产品名称:甲胎蛋白检测试剂盒\n样本要求:血清样本\n有效期:12个月"
|
||
}
|
||
|
||
findings = run_structure_check(document_texts, load_rule_file())
|
||
|
||
assert any(finding.rule_code == "instructions_for_use:储存条件" for finding in findings)
|
||
assert all("样本要求" not in finding.title for finding in findings)
|
||
|
||
|
||
def test_structure_check_reports_missing_attachment4_outline_heading():
|
||
document_texts = {
|
||
"申报资料目录.txt": "1. 监管信息\n1.2 申请表\n2. 综述资料\n3. 非临床资料\n"
|
||
}
|
||
|
||
findings = run_structure_check(document_texts, load_rule_file())
|
||
|
||
missing = next(finding for finding in findings if finding.rule_code == "attachment4_4_clinical_evaluation")
|
||
assert missing.category == "structure"
|
||
assert missing.title == "申报资料目录缺少4临床评价资料章节"
|
||
assert missing.evidence["expected_title"] == "临床评价资料"
|