refactor: 缠论引擎包化与 Web 分层(ECR-001)
将根目录引擎迁入 chanlun/ 并保留兼容 shim;拆分 TF_DF 与 web 服务; 前端模块化;strategies 改用 chanlun 导入;补充 ESS 文档与 golden 回归。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
""" /api/analyze 契约冒烟:关键字段存在于契约清单。"""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
sys.path.insert(0, str(ROOT))
|
||||
sys.path.insert(0, str(ROOT / "web"))
|
||||
|
||||
|
||||
def test_analyze_route_registered():
|
||||
from app import app
|
||||
|
||||
rules = {r.rule for r in app.url_map.iter_rules()}
|
||||
assert "/api/analyze" in rules
|
||||
assert "/api/chart_metadata" in rules
|
||||
assert "/" in rules
|
||||
assert "/chan_tv" in rules
|
||||
|
||||
|
||||
def test_contract_keys_stable():
|
||||
keys = json.loads(
|
||||
(ROOT / "tests" / "fixtures" / "analyze_contract_keys.json").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
)
|
||||
assert "bi_list" in keys and "seg_list" in keys
|
||||
Reference in New Issue
Block a user