feat: 学习进度轮询、学时依据与首页代理弹窗

This commit is contained in:
2026-11-15 05:13:48 +08:00
parent f0a2bdd854
commit 5acbea35fb
17 changed files with 921 additions and 221 deletions
+2
View File
@@ -562,11 +562,13 @@ def test_user_can_start_and_stop_study_immediately() -> None:
client.put("/api/settings/study-start", json={"day": 31, "hour": 23, "minute": 59, "second": 59})
idle = client.get("/api/settings/study-control")
assert idle.status_code == 200
assert idle.json()["workers"] == []
started = client.post("/api/settings/study-control", json={"action": "start"})
assert started.status_code == 200
assert started.json()["started"] is True
assert started.json()["ignore_window"] is True
assert started.json()["paused"] is False
assert started.json()["workers"] == []
stopped = client.post("/api/settings/study-control", json={"action": "stop"})
assert stopped.status_code == 200
assert stopped.json()["started"] is False