This commit is contained in:
@@ -591,6 +591,21 @@ def test_marketplace_matcher_promotes_variant_safe_exact_option():
|
||||
assert "shared_identity_anchor_variant_safe" in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_allows_catalog_piece_count_for_exact_dashing_diva_variant():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
diagnostics = score_marketplace_match(
|
||||
"【DASHING DIVA】MAGICPRESS 時尚潮流美甲片-銀河綠波(貓眼 漸層)",
|
||||
"Dashing Diva/F 時尚潮流美甲片-銀河綠波 30片/盒 MDF5F012AG",
|
||||
momo_price=399,
|
||||
competitor_price=420,
|
||||
)
|
||||
|
||||
assert diagnostics.score >= 0.76
|
||||
assert diagnostics.hard_veto is False
|
||||
assert "count_conflict" not in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_rejects_explicit_shade_option_mismatch():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
@@ -860,6 +875,22 @@ def test_marketplace_search_terms_keep_variant_descriptor_for_sensitive_lines():
|
||||
assert romand_terms[0] == "romand 勝過眼皮十色眼影盤"
|
||||
|
||||
|
||||
def test_marketplace_search_terms_prioritize_exact_dashing_diva_variant_name():
|
||||
from services.marketplace_product_matcher import build_search_terms
|
||||
|
||||
moon_terms = build_search_terms(
|
||||
"【DASHING DIVA】MAGICPRESS 時尚潮流美甲片-月影柔霧(貓眼 金色 漸層)",
|
||||
max_terms=5,
|
||||
)
|
||||
silk_terms = build_search_terms(
|
||||
"【DASHING DIVA】MAGICPRESS 時尚潮流美甲片-銀絲柔彩(紫色 漸層 貓眼)",
|
||||
max_terms=5,
|
||||
)
|
||||
|
||||
assert moon_terms[0] == "dashing diva 時尚潮流美甲片 月影柔霧"
|
||||
assert silk_terms[0] == "dashing diva 時尚潮流美甲片 銀絲柔彩"
|
||||
|
||||
|
||||
def test_marketplace_search_terms_prioritize_private_wash_identity_phrase():
|
||||
from services.marketplace_product_matcher import build_search_terms
|
||||
|
||||
|
||||
Reference in New Issue
Block a user