fix reservation action log tag
This commit is contained in:
1 parent
d0166d27d3
commit
2b12ddbec3
2 files changed
+10
-1
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in new issue
Block a user