feat: 历史统计时对照显示官方本月学时
This commit is contained in:
@@ -508,6 +508,8 @@ def test_check_skips_empty_credential_and_updates_saved_one(monkeypatch) -> None
|
||||
"last_refresh_at",
|
||||
"credential_valid",
|
||||
"month_hours",
|
||||
"official_month_hours",
|
||||
"hours_source",
|
||||
"monthly_target",
|
||||
"has_proxy",
|
||||
"proxy",
|
||||
|
||||
@@ -150,6 +150,7 @@ def test_login_stores_password_and_credential_only(monkeypatch) -> None:
|
||||
"last_refresh_at",
|
||||
"credential_valid",
|
||||
"month_hours",
|
||||
"official_month_hours",
|
||||
"user_name",
|
||||
"company",
|
||||
"hours_month",
|
||||
@@ -1155,6 +1156,7 @@ def test_home_and_history_hours_follow_source(monkeypatch) -> None:
|
||||
history = client.get("/api/home/history")
|
||||
assert home.json()["hours_source"] == history.json()["hours_source"] == "history"
|
||||
assert home.json()["month_hours"] == history.json()["month_hours"] == 2
|
||||
assert home.json()["official_month_hours"] == history.json()["official_month_hours"] == "60"
|
||||
assert home.json()["year_hours"] == history.json()["year_hours"] == "100"
|
||||
assert home.json()["total_hours"] == history.json()["total_hours"] == "10"
|
||||
assert home.json()["today_hours"] == history.json()["today_hours"] == 1
|
||||
|
||||
Reference in New Issue
Block a user