fix: 补齐审查清单里还没落地的交互和代理复测
This commit is contained in:
@@ -209,6 +209,7 @@ def test_hours_watcher_stops_when_target_reached(monkeypatch) -> None:
|
||||
def test_hours_watcher_history_source_uses_month_history(monkeypatch) -> None:
|
||||
saved: list[tuple[str, str]] = []
|
||||
monkeypatch.setattr("euniv.autostudy._update_month_hours", lambda eid, hours: saved.append((eid, hours)))
|
||||
monkeypatch.setattr("admin.settings.hours_source_of", lambda: "history")
|
||||
|
||||
class _HistorySession:
|
||||
async def month_history_minutes(self) -> int:
|
||||
@@ -219,7 +220,7 @@ def test_hours_watcher_history_source_uses_month_history(monkeypatch) -> None:
|
||||
|
||||
async def main() -> None:
|
||||
user_stop = asyncio.Event()
|
||||
watcher = HoursWatcher(_HistorySession(), "u1", 600, user_stop, source="history")
|
||||
watcher = HoursWatcher(_HistorySession(), "u1", 600, user_stop)
|
||||
assert await watcher.refresh() is True
|
||||
assert watcher.reached
|
||||
assert saved == [("u1", "600")]
|
||||
|
||||
Reference in New Issue
Block a user