feat: 学习进度轮询、学时依据与首页代理弹窗
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user