修复(履约绑定): 收敛活动别名中的瞬时历史角色
This commit is contained in:
@@ -57,11 +57,12 @@ def _bind(
|
||||
}
|
||||
|
||||
|
||||
def test_role_resolver_prefers_current_bound_and_reports_pending_legacy():
|
||||
def test_role_resolver_does_not_report_legacy_history_as_pending():
|
||||
"""cjm 可能返回同斗鱼账号历史绑过的另一个游戏角色,不能盖过当前活动角色。"""
|
||||
client = RoleClient(
|
||||
{
|
||||
"current-alias": _bind("当前角色", bound_act=True, bound_role=True),
|
||||
"cjm": _bind("新角色", bound_role=True),
|
||||
"cjm": _bind("历史其他账号角色", bound_role=True),
|
||||
}
|
||||
)
|
||||
|
||||
@@ -70,7 +71,7 @@ def test_role_resolver_prefers_current_bound_and_reports_pending_legacy():
|
||||
assert result["status"] == ROLE_BOUND
|
||||
assert result["role_name"] == "当前角色"
|
||||
assert result["source_alias"] == "current-alias"
|
||||
assert result["pending_role_name"] == "新角色"
|
||||
assert result["pending_role_name"] == ""
|
||||
assert client.calls == ["current-alias", "cjm"]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user