feat: 增加认证更新配置与自动检查 (#94)
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user