新增征信员工HTML样本并改造Mock解析

This commit is contained in:
wkc
2026-03-23 20:35:52 +08:00
parent 27aab7f9bc
commit 823e9f75a9
1016 changed files with 16400 additions and 9 deletions

View File

@@ -0,0 +1,19 @@
from services.credit_html_identity_service import CreditHtmlIdentityService
def test_extract_identity_should_read_generated_html_meta_fields():
service = CreditHtmlIdentityService()
html = """
<html>
<head>
<meta name="ccdi-staff-name" content="王五" />
<meta name="ccdi-staff-id-card" content="330101198801010011" />
</head>
<body></body>
</html>
"""
identity = service.extract_identity(html)
assert identity["staff_name"] == "王五"
assert identity["staff_id_card"] == "330101198801010011"