V10.583 補 Paula PChome Nick 比價對齊
All checks were successful
CD Pipeline / deploy (push) Successful in 1m7s
All checks were successful
CD Pipeline / deploy (push) Successful in 1m7s
This commit is contained in:
@@ -1391,6 +1391,40 @@ def test_marketplace_matcher_promotes_safe_multi_component_exact_sets_to_total_p
|
||||
assert "safe_multi_component_exact_total_price" in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_uses_pchome_nick_for_paulas_choice_body_lotion_pack():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
diagnostics = score_marketplace_match(
|
||||
"【Paulas Choice 寶拉珍選】2%水楊酸身體乳210ml二入",
|
||||
"【寶拉珍選】水楊酸身體乳雙入組 (2%水楊酸身體乳 210ml x2)",
|
||||
)
|
||||
|
||||
assert diagnostics.score >= 0.76
|
||||
assert diagnostics.hard_veto is False
|
||||
assert diagnostics.match_type == "exact"
|
||||
assert diagnostics.price_basis == "total_price"
|
||||
assert diagnostics.alert_tier == "price_alert_exact"
|
||||
assert "paulas_choice_body_lotion_210ml_2pack_alignment" in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_keeps_expiry_or_variant_pack_in_manual_review():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
diagnostics = score_marketplace_match(
|
||||
"【Paulas Choice 寶拉珍選】2%水楊酸精華液118ml二入組(金蓋限定版)",
|
||||
"【寶拉珍選】水楊酸精華液雙入組 【寶拉珍選】2%水楊酸精華液 118ml雙入組 效期至2026/12",
|
||||
)
|
||||
|
||||
assert diagnostics.score >= 0.76
|
||||
assert diagnostics.hard_veto is False
|
||||
assert diagnostics.match_type == "exact"
|
||||
assert diagnostics.price_basis == "manual_review"
|
||||
assert diagnostics.alert_tier == "identity_review"
|
||||
assert "commercial_condition_gap" in diagnostics.reasons
|
||||
assert "variant_selection_review" in diagnostics.reasons
|
||||
assert "safe_multi_component_exact_total_price" not in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_promotes_focused_lip_care_exact_lines_to_total_price():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
|
||||
Reference in New Issue
Block a user