fix(fulfillment): 客户资料渠道比对兼容线上手Q标签

- 线上账号渠道为微信/手Q,不能直接用QQ比较
- 补充手Q+苹果渠道匹配测试
This commit is contained in:
yml
2026-11-24 22:38:21 +08:00
parent 9feb6f4bf4
commit 7dec3c4c48
2 changed files with 25 additions and 2 deletions
+18
View File
@@ -3246,6 +3246,24 @@ class TestBindingAndCompletion(_Base):
== 1
)
def test_customer_profile_matches_online_qq_channel_label(self):
task = self._allocated()
account = self.session.get(Account, task.account_id)
account.game_name = "手Q角色"
account.game_channel = "手Q · 苹果(iOS)"
self.session.commit()
detail = service.save_customer_profile(
self.session,
task_id=task.id,
customer_role_name="手Q角色",
platform="qq",
system="ios",
home_images=[{"url": "https://example.com/qq-home.png"}],
)
assert detail["customerProfile"]["channelMatched"] is True
def test_customer_profile_requires_home_image(self):
task = self._allocated()
with pytest.raises(HTTPException) as exc_info: