Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-proctoring
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
edx-proctoring
Commits
23855534
Commit
23855534
authored
Aug 21, 2015
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test
parent
17ecb283
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
edx_proctoring/tests/test_api.py
+15
-2
No files found.
edx_proctoring/tests/test_api.py
View file @
23855534
# pylint: disable=too-many-lines
# pylint: disable=too-many-lines
, invalid-name
"""
"""
All tests for the models.py
All tests for the models.py
...
@@ -34,7 +34,8 @@ from edx_proctoring.api import (
...
@@ -34,7 +34,8 @@ from edx_proctoring.api import (
mark_exam_attempt_as_ready
,
mark_exam_attempt_as_ready
,
update_attempt_status
,
update_attempt_status
,
get_attempt_status_summary
,
get_attempt_status_summary
,
update_exam_attempt
update_exam_attempt
,
_check_for_attempt_timeout
)
)
from
edx_proctoring.exceptions
import
(
from
edx_proctoring.exceptions
import
(
ProctoredExamAlreadyExists
,
ProctoredExamAlreadyExists
,
...
@@ -384,6 +385,18 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -384,6 +385,18 @@ class ProctoredExamApiTests(LoggedInTestCase):
attempt
=
get_exam_attempt_by_id
(
attempt_id
)
attempt
=
get_exam_attempt_by_id
(
attempt_id
)
self
.
assertEqual
(
attempt
[
'allowed_time_limit_mins'
],
self
.
default_time_limit
+
allowed_extra_time
)
self
.
assertEqual
(
attempt
[
'allowed_time_limit_mins'
],
self
.
default_time_limit
+
allowed_extra_time
)
def
test_no_existing_attempt
(
self
):
"""
Make sure we get back a None when calling get_exam_attempt_by_id() with a non existing attempt
"""
self
.
assertIsNone
(
get_exam_attempt_by_id
(
0
))
def
test_check_for_attempt_timeout_with_none
(
self
):
"""
Make sure that we can safely pass in a None into _check_for_attempt_timeout
"""
self
.
assertIsNone
(
_check_for_attempt_timeout
(
None
))
def
test_recreate_an_exam_attempt
(
self
):
def
test_recreate_an_exam_attempt
(
self
):
"""
"""
Start an exam attempt that has already been created.
Start an exam attempt that has already been created.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment