fix: 平台传来的用户名按 URL 编码解码,中文用户名不再显示成乱码
This commit is contained in:
@@ -116,6 +116,8 @@ def test_identity_needs_matching_proxy_token(monkeypatch):
|
||||
assert platform_identity({**headers, "x-metrix-user-id": ""}) is None
|
||||
no_display = platform_identity({**headers, "x-metrix-display-name": ""})
|
||||
assert no_display is not None and no_display.name == "zhang"
|
||||
chinese_username = platform_identity({**headers, "x-metrix-username": quote("李四", encoding="utf-8"), "x-metrix-display-name": ""})
|
||||
assert chinese_username is not None and chinese_username.name == "李四"
|
||||
|
||||
|
||||
def test_base_href_only_accepts_app_prefix():
|
||||
|
||||
Reference in New Issue
Block a user