Merge pull request #21310 from edx/feanil/moar_test_collection_fixes

More test collection fixes.
This commit is contained in:
Feanil Patel
2019-08-08 16:23:15 -04:00
committed by GitHub
4 changed files with 11 additions and 10 deletions

View File

@@ -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)

View File

@@ -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')

View File

@@ -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-----

View File

@@ -1,10 +1,10 @@
{
"rules": {
"javascript-concat-html": 137,
"javascript-concat-html": 142,
"javascript-escape": 7,
"javascript-interpolate": 23,
"javascript-jquery-append": 68,
"javascript-jquery-html": 139,
"javascript-jquery-html": 146,
"javascript-jquery-insert-into-target": 18,
"javascript-jquery-insertion": 19,
"javascript-jquery-prepend": 6,
@@ -37,5 +37,5 @@
"django-html-interpolation-missing": 1,
"django-html-interpolation-invalid-tag": 0
},
"total": 1137
"total": 1150
}