diff --git a/douyin/fudai/core/fudai_filter_pkg/join_decision.py b/douyin/fudai/core/fudai_filter_pkg/join_decision.py index e8ee4f6..f8daa19 100644 --- a/douyin/fudai/core/fudai_filter_pkg/join_decision.py +++ b/douyin/fudai/core/fudai_filter_pkg/join_decision.py @@ -798,7 +798,7 @@ def basic_join_decision(analyser: Any, detail: Tuple) -> bool: # 剩余秒数大于"预约参与阈值",记录预约(真实写入队列) try: analyser._log_kv( - "参与", + "预约", "basic_join_decision:倒计时大于阈值,但价值达到高价值阈值,记录预约", reason=reason, value_yuan=prize_value_yuan, diff --git a/tests/test_join_decision_reservation.py b/tests/test_join_decision_reservation.py index ac63240..7a9fc73 100644 --- a/tests/test_join_decision_reservation.py +++ b/tests/test_join_decision_reservation.py @@ -49,6 +49,15 @@ def test_high_value_countdown_gt_records_reservation_and_returns_true(): assert ok is True mock_record.assert_called_once() + reservation_log_calls = [ + call + for call in analyser._log_kv.call_args_list + if len(call.args) >= 2 + and "倒计时大于阈值,但价值达到高价值阈值,记录预约" in call.args[1] + ] + assert reservation_log_calls + assert all(call.args[0] == "预约" for call in reservation_log_calls) + assert not any(call.args[0] == "参与" for call in reservation_log_calls) # 记录预约后应立即切换直播间(needswitch=True) analyser.swipe_up_to_next_live.assert_called_once()