Merge pull request #21197 from open-craft/giovanni/upgrade-pymongo
BB-1744: Bump pymongo version and fix course export issue
This commit is contained in:
@@ -350,4 +350,4 @@ def add_repo(repo, rdir_in, branch=None):
|
||||
cil.save()
|
||||
|
||||
log.debug(u'saved CourseImportLog for %s', cil.course_id)
|
||||
mdb.disconnect()
|
||||
mdb.close()
|
||||
|
||||
@@ -553,7 +553,7 @@ class GitLogs(TemplateView):
|
||||
page = min(max(1, given_page), paginator.num_pages)
|
||||
logs = paginator.page(page)
|
||||
|
||||
mdb.disconnect()
|
||||
mdb.close()
|
||||
context = {
|
||||
'logs': logs,
|
||||
'course_id': text_type(course_id) if course_id else None,
|
||||
|
||||
@@ -19,7 +19,7 @@ from testfixtures import LogCapture
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory
|
||||
|
||||
from common.test.utils import MockS3Mixin
|
||||
from common.test.utils import MockS3Mixin, py2_only
|
||||
from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification
|
||||
from lms.djangoapps.verify_student.tests.test_models import FAKE_SETTINGS, mock_software_secure_post
|
||||
|
||||
@@ -206,11 +206,14 @@ class TestSendVerificationExpiryEmail(MockS3Mixin, ModuleStoreTestCase):
|
||||
self.assertEqual(len(mail.outbox), 1)
|
||||
self.assertIsNone(attempt.expiry_email_date)
|
||||
|
||||
@py2_only
|
||||
def test_user_enrolled_in_verified_course(self):
|
||||
"""
|
||||
Test that if the user is enrolled in verified track, then after sending the default no of
|
||||
emails, `expiry_email_date` is updated to now() so that it's filtered in the future to send
|
||||
email again
|
||||
email again.
|
||||
|
||||
Does not work on python 3 with the latest mongo driver version due to class inheritance issues.
|
||||
"""
|
||||
user = UserFactory.create()
|
||||
course = CourseFactory()
|
||||
|
||||
@@ -23,7 +23,7 @@ FAKE_SETTINGS = {
|
||||
|
||||
@patch.dict(settings.VERIFY_STUDENT, FAKE_SETTINGS)
|
||||
@ddt.ddt
|
||||
class TestIDVerificationService(MockS3Mixin, ModuleStoreTestCase):
|
||||
class TestIDVerificationService(ModuleStoreTestCase, MockS3Mixin):
|
||||
"""
|
||||
Tests for IDVerificationService.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user