feat(update): securely stage verified packages
This commit is contained in:
@@ -43,6 +43,9 @@ class UpdateCheckTests(unittest.TestCase):
|
||||
"force_update": True,
|
||||
"download_url": "https://example.test/cmshopee.zip",
|
||||
"sha256": "abc",
|
||||
"size_bytes": 123,
|
||||
"package_format": "cmshopee-portable-v1",
|
||||
"updater_protocol": 1,
|
||||
"message": "请升级后继续使用",
|
||||
}
|
||||
|
||||
@@ -57,6 +60,8 @@ class UpdateCheckTests(unittest.TestCase):
|
||||
self.assertFalse(result.can_enter)
|
||||
self.assertEqual("1.2.0", result.latest_version)
|
||||
self.assertEqual("https://example.test/cmshopee.zip", result.download_url)
|
||||
self.assertEqual(123, result.size_bytes)
|
||||
self.assertEqual("cmshopee-portable-v1", result.package_format)
|
||||
|
||||
def test_check_for_update_accepts_release_wrapper_response(self):
|
||||
def fetcher(_url, _timeout):
|
||||
|
||||
Reference in New Issue
Block a user