contest
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user