[HLCC-ICE-000001][ZY-CONTRIB-20260723-001] feat: 以来光者贡献链启用冰朔第五域个人子频道
This commit is contained in:
commit
5615453e4e
660 changed files with 122355 additions and 0 deletions
34
server-tools/light-arrival-navigation/test_route_recall.py
Normal file
34
server-tools/light-arrival-navigation/test_route_recall.py
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import json
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from route_recall import DEFAULT_MAP, ROOT, recall
|
||||
|
||||
|
||||
class RouteRecallTest(unittest.TestCase):
|
||||
def test_expected_routes(self):
|
||||
cases = {
|
||||
"六节点灾备": "ZY-CONTRIB-20260720-001",
|
||||
"TestFlight Windows": "ZY-CONTRIB-20260719-001",
|
||||
"短剧 Seedance": "ZY-CONTRIB-20260720-002",
|
||||
"铸渊恢复路径": "ZY-CONTRIB-20260720-003",
|
||||
"HoloLake 0.2.0 工具回执 Windows安装包": "ZY-CONTRIB-20260722-001",
|
||||
}
|
||||
for query, expected in cases.items():
|
||||
with self.subTest(query=query):
|
||||
result = recall(query)
|
||||
self.assertEqual(result["status"], "FOUND_CONFIDENT_PATH")
|
||||
self.assertEqual(result["matches"][0]["contribution_id"], expected)
|
||||
self.assertFalse(result["matches"][0]["grants_execution_authority"])
|
||||
|
||||
def test_unknown_does_not_guess(self):
|
||||
self.assertEqual(recall("完全不存在的火星工程")["status"], "NO_TRUSTED_PATH")
|
||||
|
||||
def test_all_canonical_paths_exist(self):
|
||||
data = json.loads(DEFAULT_MAP.read_text(encoding="utf-8"))
|
||||
missing = [path for item in data["contributions"] for path in item["canonical_paths"] if not (ROOT / path).exists()]
|
||||
self.assertEqual(missing, [])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Loading…
Reference in a new issue