fix(douyu): 支持同名角色重新绑定
This commit is contained in:
@@ -238,7 +238,34 @@ def test_same_role_after_activity_bind_transition_is_pending():
|
||||
)
|
||||
|
||||
|
||||
def test_pending_candidate_picker_ignores_legacy_same_role_residual():
|
||||
def test_same_bound_role_with_need_bind_act_is_confirmable():
|
||||
role = "少和我较劲"
|
||||
baseline = _role_candidate(
|
||||
ACT_ALIAS,
|
||||
role,
|
||||
bound_act=True,
|
||||
need_bind_act=True,
|
||||
)
|
||||
candidate = _role_candidate(
|
||||
ACT_ALIAS,
|
||||
role,
|
||||
bound_act=True,
|
||||
need_bind_act=True,
|
||||
)
|
||||
|
||||
decision = binding_pending_decision(
|
||||
candidate,
|
||||
baseline_role_name=role,
|
||||
baseline_is_bound_act=True,
|
||||
baseline_info=baseline,
|
||||
actionable_aliases=[ACT_ALIAS],
|
||||
)
|
||||
|
||||
assert decision["confirmable"] is True
|
||||
assert decision["reason"] == "same_alias_after_bound_transition"
|
||||
|
||||
|
||||
def test_pending_candidate_picker_uses_action_alias_same_role():
|
||||
old_role = "少和我较劲"
|
||||
baseline = _role_candidate(ACT_ALIAS, old_role, bound_act=True)
|
||||
legacy = _role_candidate(LEGACY_ALIAS, old_role, bound_act=False)
|
||||
@@ -252,7 +279,8 @@ def test_pending_candidate_picker_ignores_legacy_same_role_residual():
|
||||
baseline_info=baseline,
|
||||
)
|
||||
|
||||
assert selected is None
|
||||
assert selected is not None
|
||||
assert selected["act_alias"] == ACT_ALIAS
|
||||
|
||||
|
||||
def test_task_result_helpers_use_shared_same_role_transition_rule():
|
||||
|
||||
Reference in New Issue
Block a user