Files
DEMO-AGENT/tests/test_regulatory_consistency.py

28 lines
1.2 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from review_agent.regulatory_review.services.consistency_check import run_consistency_check
def test_consistency_check_reports_product_name_mismatch():
document_texts = {
"说明书.docx": "产品名称:甲胎蛋白检测试剂盒\n型号规格20人份/盒\n预期用途定量检测AFP",
"技术要求.docx": "产品名称:乙肝表面抗原检测试剂盒\n型号规格20人份/盒\n预期用途定量检测AFP",
}
findings = run_consistency_check(document_texts)
assert len(findings) == 1
assert findings[0].category == "consistency"
assert "产品名称" in findings[0].title
def test_consistency_check_reports_registration_scope_fields():
document_texts = {
"申请表.docx": "管理类别:第二类\n分类编码6840\n注册类型:首次注册\n临床评价路径:免临床",
"综述资料.docx": "管理类别:第三类\n分类编码6840\n注册类型:首次注册\n临床评价路径:临床试验",
}
findings = run_consistency_check(document_texts)
titles = [finding.title for finding in findings]
assert "管理类别在不同文件中不一致" in titles
assert "临床评价路径在不同文件中不一致" in titles