修复(履约确认): 扫码角色消失不再误报客户冷却
- confirm 找不到已识别角色时归为 role_changed - 客户页/工作台允许刷新二维码重新扫码 - 保留账号,避免角色变化被当成换绑冷却 - 补充角色消失分类测试
This commit is contained in:
@@ -38,6 +38,10 @@ from web.backend.services.automation.jobs import (
|
||||
platform_fulfillment_lease_reaper as reaper,
|
||||
)
|
||||
from web.backend.services.platform_fulfillment import account_selector, service, views
|
||||
from web.backend.services.platform_fulfillment.binding_status import (
|
||||
_binding_failure_issue,
|
||||
_binding_failure_raw_message,
|
||||
)
|
||||
from web.backend.services.platform_fulfillment.order_sync import _apply_customer_profile
|
||||
|
||||
NOW = datetime.now(UTC).replace(microsecond=0)
|
||||
@@ -3387,6 +3391,25 @@ class TestBindingAndCompletion(_Base):
|
||||
|
||||
assert detail["customerProfile"]["channelMatched"] is True
|
||||
|
||||
def test_confirm_role_disappeared_is_not_customer_cooldown(self):
|
||||
result = {
|
||||
"bind_phase": "confirm_failed",
|
||||
"expected_role_name": "再说就一坨儿",
|
||||
"bind_candidates": [
|
||||
{"act_alias": "cjm", "role_name": ""},
|
||||
{"act_alias": "20260120QYOOB", "role_name": "小无恩"},
|
||||
],
|
||||
}
|
||||
task = DouyuTask(
|
||||
message="待确认角色已变化,未找到: 再说就一坨儿",
|
||||
result=result,
|
||||
)
|
||||
|
||||
assert _binding_failure_issue(task, result) == "role_changed"
|
||||
assert "扫码角色已失效" in _binding_failure_raw_message(
|
||||
"role_changed", result
|
||||
)
|
||||
|
||||
def test_customer_profile_requires_home_image(self):
|
||||
task = self._allocated()
|
||||
with pytest.raises(HTTPException) as exc_info:
|
||||
|
||||
Reference in New Issue
Block a user