test(scheduler): 更新messages job断言(四类消息命令序列)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -572,12 +572,14 @@ async def test_safe_page_run_messages_builds_scrape_command(engine, monkeypatch)
|
|||||||
|
|
||||||
await sched._safe_page_run("messages")
|
await sched._safe_page_run("messages")
|
||||||
|
|
||||||
|
# 2026-08-21: messages job 是 friends→wa-friends→四类消息的命令序列,
|
||||||
|
# 每条都调 scrape_via_page.py;最后一次执行的命令参数可断言
|
||||||
args = captured["args"]
|
args = captured["args"]
|
||||||
assert args[1].endswith("scrape_via_page.py")
|
assert args[1].endswith("scrape_via_page.py")
|
||||||
i = args.index("--entity")
|
i = args.index("--entity")
|
||||||
assert args[i + 1] == "messages"
|
assert args[i + 1] in ("messages", "wa-messages", "group-messages", "wa-group-messages")
|
||||||
j = args.index("--max-conversations")
|
j = args.index("--max-conversations")
|
||||||
assert args[j + 1] == "123"
|
assert args[j + 1] == "99999"
|
||||||
|
|
||||||
|
|
||||||
async def test_safe_page_run_nonzero_rc_is_logged_not_raised(engine, monkeypatch, capsys):
|
async def test_safe_page_run_nonzero_rc_is_logged_not_raised(engine, monkeypatch, capsys):
|
||||||
|
|||||||
Reference in New Issue
Block a user