Commit 0147a5e1 by Chris Dodge

fix tests

parent 8e254a6e
......@@ -535,6 +535,8 @@ def get_student_view(user_id, course_id, content_id,
# make sure the attempt has been marked as timed_out, if need be
if has_time_expired and attempt['status'] == ProctoredExamStudentAttemptStatus.started:
mark_exam_attempt_timeout(exam_id, user_id)
# refetch since we are transitioning state
attempt = get_exam_attempt(exam_id, user_id)
if not has_started_exam:
# determine whether to show a timed exam only entrance screen
......
......@@ -42,6 +42,7 @@ from edx_proctoring.models import (
ProctoredExam,
ProctoredExamStudentAllowance,
ProctoredExamStudentAttempt,
ProctoredExamStudentAttemptStatus,
)
from .utils import (
......@@ -140,6 +141,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
user_id=self.user_id,
external_id=self.external_id,
started_at=started_at if started_at else datetime.now(pytz.UTC),
status=ProctoredExamStudentAttemptStatus.started,
allowed_time_limit_mins=10
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment