Bug2.0 #20

Merged
Jacky merged 3 commits from bug2.0 into main 2026-08-09 16:22:22 +08:00
Showing only changes of commit 589adfa5e6 - Show all commits
+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)