Fix v2 fudai detail recognition
This commit is contained in:
1 parent
fc96549bd2
commit
8dbaab9d27
6 files changed
+106
-12
No files matched your search
@@ -80,6 +80,21 @@ class TestValidateFudaiDetail:
|
||||
assert isinstance(is_valid, bool)
|
||||
assert isinstance(reason, str)
|
||||
|
||||
def test_value_raw_accepts_zero_yuan_marketing_prefix(self):
|
||||
from types import SimpleNamespace
|
||||
from douyin.fudai.core.fudai_detail_validator import validate_fudai_detail
|
||||
|
||||
analyser = SimpleNamespace(
|
||||
value_raw="0元带走¥999参考价值",
|
||||
countdown_mm_raw="07",
|
||||
countdown_ss_raw="59",
|
||||
)
|
||||
detail = ("福袋内容", "07:59", 0, 0, 999.0, (1000.0, 1479.0))
|
||||
|
||||
is_valid, reason = validate_fudai_detail(detail, analyser)
|
||||
|
||||
assert is_valid is True, reason
|
||||
|
||||
|
||||
class TestFudaiDetailShimConsistency:
|
||||
"""验证 fudai_detail shim 与子模块导出一致。"""
|
||||
|
||||
Reference in new issue
Block a user