feat: 学时历史可打开对应课程
This commit is contained in:
@@ -1184,6 +1184,33 @@ def test_month_hours_refresh_follows_source() -> None:
|
||||
assert _month_hours(HistoryClient()) == "80"
|
||||
|
||||
|
||||
def test_history_course_path_follows_type_and_keeps_explicit_url() -> None:
|
||||
from euniv.client import _history_api_item
|
||||
|
||||
video = _history_api_item(
|
||||
{
|
||||
"targetName": "视频课",
|
||||
"studyDate": "2026-11-18 10:00",
|
||||
"studyHour": 3,
|
||||
"knowledgeId": "125c7576-c22e-4ae7-be92-ce005171facb",
|
||||
"knowledgeType": "VideoKnowledge",
|
||||
}
|
||||
)
|
||||
assert video is not None
|
||||
assert video["path"] == "/kng/view/video/125c7576c22e4ae7be92ce005171facb.html"
|
||||
named = _history_api_item(
|
||||
{
|
||||
"title": "已有地址",
|
||||
"studiedAt": "2026-11-18",
|
||||
"duration": 1,
|
||||
"url": "/kng/view/package/abc.html",
|
||||
"knowledgeType": "VideoKnowledge",
|
||||
}
|
||||
)
|
||||
assert named is not None
|
||||
assert named["path"] == "/kng/view/package/abc.html"
|
||||
|
||||
|
||||
def test_study_history_parses_period_table() -> None:
|
||||
from euniv.client import EunivClient
|
||||
|
||||
|
||||
Reference in New Issue
Block a user