feat: 增加认证更新配置与自动检查 (#94)

This commit is contained in:
chengma
2026-08-10 14:31:44 +08:00
parent 48bbe1cc2c
commit dc375ff2af
14 changed files with 727 additions and 107 deletions
@@ -0,0 +1,26 @@
"""Windows 更新凭据按服务器隔离的测试。"""
import unittest
from src.windows_credential_store import WindowsCredentialStore
class WindowsCredentialStoreTest(unittest.TestCase):
def test_different_origins_use_different_credential_targets(self):
http_store = WindowsCredentialStore.for_url(
"http://cm.xiapi.com/autobuy——manifest.json"
)
https_store = WindowsCredentialStore.for_url(
"https://cm.xiapi.com/autobuy——manifest.json"
)
other_store = WindowsCredentialStore.for_url(
"https://updates.example.test/manifest.json"
)
self.assertNotEqual(http_store.target, https_store.target)
self.assertNotEqual(https_store.target, other_store.target)
self.assertNotIn("@", http_store.target)
if __name__ == "__main__":
unittest.main()