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
893cfd3a
Commit
893cfd3a
authored
Aug 21, 2015
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some more unicode tests and fix logging problem
parent
0a429c11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
+21
-8
edx_proctoring/api.py
+8
-8
edx_proctoring/backends/tests/test_software_secure.py
+13
-0
No files found.
edx_proctoring/api.py
View file @
893cfd3a
...
@@ -75,10 +75,10 @@ def create_exam(course_id, content_id, exam_name, time_limit_mins,
...
@@ -75,10 +75,10 @@ def create_exam(course_id, content_id, exam_name, time_limit_mins,
)
)
log_msg
=
(
log_msg
=
(
'Created exam ({exam_id}) with parameters: course_id={course_id}, '
u
'Created exam ({exam_id}) with parameters: course_id={course_id}, '
'content_id={content_id}, exam_name={exam_name}, time_limit_mins={time_limit_mins}, '
u
'content_id={content_id}, exam_name={exam_name}, time_limit_mins={time_limit_mins}, '
'is_proctored={is_proctored}, is_practice_exam={is_practice_exam}, '
u
'is_proctored={is_proctored}, is_practice_exam={is_practice_exam}, '
'external_id={external_id}, is_active={is_active}'
.
format
(
u
'external_id={external_id}, is_active={is_active}'
.
format
(
exam_id
=
proctored_exam
.
id
,
exam_id
=
proctored_exam
.
id
,
course_id
=
course_id
,
content_id
=
content_id
,
course_id
=
course_id
,
content_id
=
content_id
,
exam_name
=
exam_name
,
time_limit_mins
=
time_limit_mins
,
exam_name
=
exam_name
,
time_limit_mins
=
time_limit_mins
,
...
@@ -101,10 +101,10 @@ def update_exam(exam_id, exam_name=None, time_limit_mins=None,
...
@@ -101,10 +101,10 @@ def update_exam(exam_id, exam_name=None, time_limit_mins=None,
"""
"""
log_msg
=
(
log_msg
=
(
'Updating exam_id {exam_id} with parameters '
u
'Updating exam_id {exam_id} with parameters '
'exam_name={exam_name}, time_limit_mins={time_limit_mins}, '
u
'exam_name={exam_name}, time_limit_mins={time_limit_mins}, '
'is_proctored={is_proctored}, is_practice_exam={is_practice_exam}, '
u
'is_proctored={is_proctored}, is_practice_exam={is_practice_exam}, '
'external_id={external_id}, is_active={is_active}'
.
format
(
u
'external_id={external_id}, is_active={is_active}'
.
format
(
exam_id
=
exam_id
,
exam_name
=
exam_name
,
time_limit_mins
=
time_limit_mins
,
exam_id
=
exam_id
,
exam_name
=
exam_name
,
time_limit_mins
=
time_limit_mins
,
is_proctored
=
is_proctored
,
is_practice_exam
=
is_practice_exam
,
is_proctored
=
is_proctored
,
is_practice_exam
=
is_practice_exam
,
external_id
=
external_id
,
is_active
=
is_active
external_id
=
external_id
,
is_active
=
is_active
...
...
edx_proctoring/backends/tests/test_software_secure.py
View file @
893cfd3a
...
@@ -174,6 +174,19 @@ class SoftwareSecureTests(TestCase):
...
@@ -174,6 +174,19 @@ class SoftwareSecureTests(TestCase):
attempt_id
=
create_exam_attempt
(
exam_id
,
self
.
user
.
id
,
taking_as_proctored
=
True
)
attempt_id
=
create_exam_attempt
(
exam_id
,
self
.
user
.
id
,
taking_as_proctored
=
True
)
self
.
assertIsNotNone
(
attempt_id
)
self
.
assertIsNotNone
(
attempt_id
)
# try unicode exam name, also
exam_id
=
create_exam
(
course_id
=
'foo/bar/baz'
,
content_id
=
'content_unicode_name'
,
exam_name
=
u'अआईउऊऋऌ अआईउऊऋऌ'
,
time_limit_mins
=
10
,
is_proctored
=
True
)
with
HTTMock
(
mock_response_content
):
attempt_id
=
create_exam_attempt
(
exam_id
,
self
.
user
.
id
,
taking_as_proctored
=
True
)
self
.
assertIsNotNone
(
attempt_id
)
def
test_failing_register_attempt
(
self
):
def
test_failing_register_attempt
(
self
):
"""
"""
Makes sure we can register an attempt
Makes sure we can register an attempt
...
...
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