Commit 5ab7121e by chrisndodge

Merge pull request #117 from edx/cdodge/unicode-exam-name

add some more unicode tests and fix logging problem
parents 0a429c11 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
......
...@@ -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
......
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