fix(douyu): 区分平台账号与客户游戏账号换绑冷却
This commit is contained in:
@@ -18,6 +18,7 @@ from web.backend.services.account_binding import (
|
||||
binding_snapshot,
|
||||
derive_from_bind_info,
|
||||
is_pending_binding_role,
|
||||
is_platform_account_bind_cooldown,
|
||||
is_role_change_cooling,
|
||||
pending_binding_role_from_result,
|
||||
role_change_available_at,
|
||||
@@ -616,6 +617,14 @@ def test_confirm_bind_preserves_platform_cooldown_error_code(monkeypatch):
|
||||
assert exc_info.value.payload == payload
|
||||
|
||||
|
||||
def test_bind_cooldown_messages_distinguish_platform_and_customer_accounts():
|
||||
customer_message = "该账号未到可换绑时间,请使用其他账号"
|
||||
platform_message = "该平台账号未到可换绑时间,请使用其他平台账号"
|
||||
|
||||
assert is_platform_account_bind_cooldown(-200001, customer_message) is False
|
||||
assert is_platform_account_bind_cooldown(-200001, platform_message) is True
|
||||
|
||||
|
||||
def test_get_bind_qr_uses_role_param_url_for_mini_qrcode(monkeypatch):
|
||||
client = DouyuActivityClient("acf_ccn=ctn")
|
||||
monkeypatch.setattr(
|
||||
|
||||
@@ -2512,6 +2512,8 @@ class TestBindingAndCompletion(_Base):
|
||||
"role_name": "测试角色",
|
||||
"bind_ready_for_confirm": True,
|
||||
"bind_confirmed": False,
|
||||
"confirm_error": "该账号未到可换绑时间,请使用其他账号",
|
||||
"confirm_error_code": -200001,
|
||||
},
|
||||
created_by=self.admin_id,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user