修复(履约选号): 按客户QQ/微信、iOS/安卓和角色优先选号
- 候选账号按客户登录方式和系统过滤,避免微信账号接QQ角色 - 客户角色已绑定的账号优先,且不再被未来换绑时间误排除 - 自动选号传入客户资料 - 补充渠道/角色选择测试
This commit is contained in:
@@ -1359,6 +1359,27 @@ class TestAccountSelection(_Base):
|
||||
== 1
|
||||
)
|
||||
|
||||
def test_capability_candidates_filter_customer_channel_and_prefer_exact_role(
|
||||
self,
|
||||
):
|
||||
matching = self.account("channel-role-match", role_available_at=NOW + timedelta(days=7))
|
||||
matching.game_name = "再说就一坨儿"
|
||||
matching.game_channel = "手Q · 安卓(android)"
|
||||
wrong_channel = self.account("channel-wrong")
|
||||
wrong_channel.game_name = "小无恩"
|
||||
wrong_channel.game_channel = "微信 / 安卓(android)"
|
||||
self.session.commit()
|
||||
|
||||
candidates = account_selector.capability_candidate_rows(
|
||||
self.session,
|
||||
commodity_id=COMMODITY,
|
||||
customer_role_name="再说就一坨儿",
|
||||
customer_platform="qq",
|
||||
customer_system="android",
|
||||
)
|
||||
|
||||
assert [item.account.id for item in candidates] == [matching.id]
|
||||
|
||||
def test_capability_match_uses_local_index_without_live_probe(self):
|
||||
account = self.account("capability-fast", capability=False)
|
||||
task = self.task()
|
||||
|
||||
Reference in New Issue
Block a user