fix: 心跳摘要改为在线 GetEncryptRequest 不再写死密钥

This commit is contained in:
2026-11-15 01:40:12 +08:00
parent caa79d79b7
commit ecd774507f
5 changed files with 344 additions and 56 deletions
-26
View File
@@ -5,7 +5,6 @@ import pytest
from datetime import datetime
from euniv.autostudy import HoursWatcher, _parse_minutes, _study_video, wait_stop
from euniv.client import study_encryption
from euniv.proxy import ProxyError, build_proxy_url, parse_proxy
from euniv.study_window import CN_TZ, StudyWindowError, validate_start, window_open
@@ -166,31 +165,6 @@ def test_video_skip_already_complete_does_not_refresh() -> None:
asyncio.run(main())
def test_study_encryption_matches_get_encrypt_request() -> None:
import json
body = json.dumps(
{
"knowledgeId": "6d16a38ebdfe455fbb1e86ec0c0c35d7",
"masterId": "",
"masterType": "",
"packageId": "",
"pageSize": 1,
"studySize": 1,
"studyTime": 120,
"type": 1,
"offLine": False,
"end": False,
"care": True,
"deviceId": "",
"studyChapterIds": "",
"viewSchedule": 1,
},
separators=(",", ":"),
)
assert study_encryption(body) == "ba119ee448648d9f8f046d11c426afa4"
class _Start:
def __init__(self, day: int, hour: int = 16, minute: int = 0, second: int = 0) -> None:
self.study_start_day = day