contest
CI / test (pull_request) Successful in 4m2s
PR合并自动部署 / release-check (pull_request) Successful in 12s
PR合并自动部署 / deploy (pull_request) Successful in 14s

This commit is contained in:
2026-08-09 16:15:41 +08:00
parent 9f9aa2825a
commit 589adfa5e6
+3 -4
View File
@@ -1,14 +1,14 @@
"""端到端模拟两人实时竞赛,覆盖同分不同时长的平局判定场景。"""
from datetime import timedelta
import pytest
from django.test import Client
from django.utils import timezone
from datetime import timedelta
from accounts.models import User
from contest.models import (
Contest,
ContestAttempt,
ContestQuestion,
Question,
QuestionVersion,
@@ -298,8 +298,7 @@ def test_双方都超时则由_refresh_自动结算判平(db):
second = _create_user("both_to_p2", "慢超时")
fc, sc = _client(first), _client(second)
match_id, fs, ss = _create_and_join(fc, sc, contest)
fa, sa = fs["attempt"]["attempt_id"], ss["attempt"]["attempt_id"]
match_id, _, _ = _create_and_join(fc, sc, contest)
# 两个人都不提交,直接让 match 超时
match = RealtimeMatch.objects.get(id=match_id)