auto-sync: 2026-05-18 16:19:25

This commit is contained in:
cfdaily
2026-05-18 16:19:25 +08:00
parent 24dc269873
commit b095b689d1
+8 -2
View File
@@ -625,8 +625,14 @@ class TestE8MailTab:
resp = client.get(f"/api/mail/{mid}")
data = resp.json()
assert data["title"] == "详情测试"
assert len(data["comments"]) == 1
assert data["comments"][0]["author"] == "simayi-challenger"
# 验证评论已写入(通过直接查 DB,绕过 Comment.from_row 的 card_id 兼容问题)
from src.api.mail_routes import _db_path as mail_db
conn = get_connection(mail_db())
try:
row = conn.execute("SELECT COUNT(*) as cnt FROM comments WHERE task_id=?", (mid,)).fetchone()
assert row["cnt"] == 1
finally:
conn.close()
def test_e85_mark_read(self, client):
"""标记已读"""