fix: 过滤权限变更通知,不写入相关智能纪要

This commit is contained in:
Benature
2026-11-29 20:47:55 +08:00
parent e2efcf900e
commit 80b1f10fc5
3 changed files with 24 additions and 6 deletions

View File

@ -48,15 +48,26 @@ def test_fetch_ai_notes_links_reads_topic_from_local_content():
),
})
links = fetch_ai_notes_links(
object(), date(2026, 11, 17), tz, storage=storage
)
links = fetch_ai_notes_links(object(), date(2026, 11, 17), tz, storage=storage)
assert len(links) == 1
assert links[0]["url"].startswith("https://efund.feishu.cn/minutes/abc123")
assert links[0]["topic"] == "指数-金科定期AI业务讨论会"
def test_permission_change_links_are_dropped():
from snooper_calendar import _drop_permission_change
links = [
{"url": "https://efund.feishu.cn/minutes/m1?from_source=permission_change"},
{"url": "https://efund.feishu.cn/minutes/m2?from_source=finish_recording"},
]
kept = _drop_permission_change(links)
assert [link["url"] for link in kept] == [
"https://efund.feishu.cn/minutes/m2?from_source=finish_recording"
]
class FakeCalendarClient:
def __init__(self):
self.calls = []