feat(r1-touch): 建议分级+决策类推送+应用前预览 (alert不推送/同title防轰炸/preview对比)
This commit is contained in:
@@ -90,6 +90,17 @@ def setup_db():
|
||||
cache_util.delete("ai")
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _disable_ai_suggestion_push(monkeypatch):
|
||||
"""R1触达修复(2026-08-31): 测试库把企微推送替换为 no-op,防测试建议推真实企微群
|
||||
|
||||
生产环境真实推送(8800 relay);测试只验证推送逻辑(决策类推/预警不推/幂等)不打真实企微。
|
||||
测试类如需断言推送内容,可自行 monkeypatch.setattr 覆盖本 no-op。
|
||||
"""
|
||||
from app.api import ai_analysis
|
||||
monkeypatch.setattr(ai_analysis, "_push_decision_suggestion", lambda s: True)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def db() -> Generator[Session, None, None]:
|
||||
"""提供数据库 session"""
|
||||
|
||||
Reference in New Issue
Block a user