28 lines
764 B
Python
28 lines
764 B
Python
# -*- coding: utf-8 -*-
|
|
"""转接分组测试"""
|
|
import sys
|
|
import json
|
|
from pathlib import Path
|
|
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
|
|
|
|
|
def test_get_transfer_group():
|
|
"""测试转接分组查找逻辑"""
|
|
from config.config import CONFIG_DIR
|
|
config_path = CONFIG_DIR / "transfer_groups.json"
|
|
default = "20252916034"
|
|
if not config_path.exists():
|
|
print("transfer_groups.json 不存在,跳过")
|
|
return
|
|
with open(config_path, "r", encoding="utf-8") as f:
|
|
cfg = json.load(f)
|
|
got = cfg.get("default", default)
|
|
assert got
|
|
print(f"default group: {got}")
|
|
print("transfer groups OK")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
test_get_transfer_group()
|
|
print("All transfer tests passed")
|