More test collection fixes.
This commit is contained in:
@@ -183,11 +183,11 @@ class TestSysAdminMongoCourseImport(SysadminBaseTestCase):
|
||||
# Regex of first 3 columns of course information table row for
|
||||
# test course loaded from git. Would not have sha1 if
|
||||
# git_info_for_course failed.
|
||||
table_re = re.compile(ur"""
|
||||
<tr>\s+
|
||||
<td>edX\sAuthor\sCourse</td>\s+ # expected test git course name
|
||||
<td>course-v1:MITx\+edx4edx\+edx4edx</td>\s+ # expected test git course_id
|
||||
<td>[a-fA-F\d]{40}</td> # git sha1 hash
|
||||
table_re = re.compile(u"""
|
||||
<tr>\\s+
|
||||
<td>edX\\sAuthor\\sCourse</td>\\s+ # expected test git course name
|
||||
<td>course-v1:MITx\\+edx4edx\\+edx4edx</td>\\s+ # expected test git course_id
|
||||
<td>[a-fA-F\\d]{40}</td> # git sha1 hash
|
||||
""", re.VERBOSE)
|
||||
self._setstaff_login()
|
||||
self._mkdir(settings.GIT_REPO_DIR)
|
||||
|
||||
@@ -39,7 +39,7 @@ def load_serialized_data(response, key):
|
||||
"""
|
||||
Extract and deserialize serialized data from the response.
|
||||
"""
|
||||
pattern = re.compile(ur'{key}: (?P<data>\[.*\])'.format(key=key))
|
||||
pattern = re.compile(u'{key}: (?P<data>\\[.*\\])'.format(key=key))
|
||||
match = pattern.search(response.content)
|
||||
serialized = match.group('data')
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ Tests of the encryption and decryption utilities in the ssencrypt module.
|
||||
from __future__ import absolute_import
|
||||
|
||||
import base64
|
||||
import binascii
|
||||
|
||||
from lms.djangoapps.verify_student.ssencrypt import (
|
||||
aes_decrypt,
|
||||
@@ -15,7 +16,7 @@ from lms.djangoapps.verify_student.ssencrypt import (
|
||||
rsa_encrypt
|
||||
)
|
||||
|
||||
AES_KEY_BYTES = b'32fe72aaf2abb44de9e161131b5435c8d37cbdb6f5df242ae860b283115f2dae'.decode('hex')
|
||||
AES_KEY_BYTES = binascii.unhexlify(b'32fe72aaf2abb44de9e161131b5435c8d37cbdb6f5df242ae860b283115f2dae')
|
||||
|
||||
# Make up some garbage keys for testing purposes.
|
||||
PUB_KEY_BYTES = b"""-----BEGIN PUBLIC KEY-----
|
||||
|
||||
Reference in New Issue
Block a user