fix: speed up fansclub reservation prejoin

This commit is contained in:
Your Name committed 2026-06-23 10:43:17 +08:00
1 parent 0efdc83d0b
commit a449b7634c
15 files changed
+312 -31

No files matched your search

+19
View File
@@ -289,6 +289,25 @@ class TestFudaiDetectionDefaults:
assert analyser.reservation_direct_attend_max_failures == 3
assert analyser.reservation_direct_attend_open_max_wait_seconds == 2.25
def test_config_loader_loads_reservation_prejoin_fansclub_delays(self):
from douyin.utils.douyin_config import ConfigManager
analyser = SimpleNamespace()
config = {
"reservation_prejoin_fansclub_participate_wait_seconds": 0.25,
"reservation_prejoin_fansclub_confirm_wait_seconds": 0.35,
}
with tempfile.NamedTemporaryFile("w", suffix=".json", delete=False) as f:
json.dump(config, f)
tmp_path = f.name
try:
ConfigManager.load_config_from_file(analyser, tmp_path)
finally:
os.unlink(tmp_path)
assert analyser.reservation_prejoin_fansclub_participate_wait_seconds == 0.25
assert analyser.reservation_prejoin_fansclub_confirm_wait_seconds == 0.35
class TestCoreModules:
"""core 子模块存在性测试。"""