feat: complete T-532 cmhub account prompt

This commit is contained in:
chengma
2026-07-06 15:56:28 +08:00
parent a4e951961e
commit c42c12ef3e
10 changed files with 183 additions and 13 deletions
+4
View File
@@ -284,8 +284,10 @@ class AppConfigTests(TempDirMixin, unittest.TestCase):
def test_sanitize_for_log_masks_secret_fields(self):
payload = {
"name": "demo",
"email": "owner@example.com",
"api_key": "sk-1234567890",
"nested": {
"support_email": "helpdesk@example.com",
"password": "account-secret",
"items": [
{"provider_token": "token-secret"},
@@ -298,6 +300,8 @@ class AppConfigTests(TempDirMixin, unittest.TestCase):
sanitized = appconfig.sanitize_for_log(payload)
self.assertEqual("demo", sanitized["name"])
self.assertEqual("o***r@example.com", sanitized["email"])
self.assertEqual("h***k@example.com", sanitized["nested"]["support_email"])
self.assertEqual("sk-1***7890", sanitized["api_key"])
self.assertEqual("acco***cret", sanitized["nested"]["password"])
self.assertEqual("toke***cret", sanitized["nested"]["items"][0]["provider_token"])