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 import pytest
from django.test import Client from django.test import Client
from django.utils import timezone from django.utils import timezone
from datetime import timedelta
from accounts.models import User from accounts.models import User
from contest.models import ( from contest.models import (
Contest, Contest,
ContestAttempt,
ContestQuestion, ContestQuestion,
Question, Question,
QuestionVersion, QuestionVersion,
@@ -298,8 +298,7 @@ def test_双方都超时则由_refresh_自动结算判平(db):
second = _create_user("both_to_p2", "慢超时") second = _create_user("both_to_p2", "慢超时")
fc, sc = _client(first), _client(second) fc, sc = _client(first), _client(second)
match_id, fs, ss = _create_and_join(fc, sc, contest) match_id, _, _ = _create_and_join(fc, sc, contest)
fa, sa = fs["attempt"]["attempt_id"], ss["attempt"]["attempt_id"]
# 两个人都不提交,直接让 match 超时 # 两个人都不提交,直接让 match 超时
match = RealtimeMatch.objects.get(id=match_id) match = RealtimeMatch.objects.get(id=match_id)