Fix redefined-function errors
This commit is contained in:
@@ -244,13 +244,13 @@ class EnrollmentDataTest(ModuleStoreTestCase):
|
||||
|
||||
@raises(CourseEnrollmentFullError)
|
||||
@patch.object(CourseEnrollment, "enroll")
|
||||
def test_enrollment_for_closed_course(self, mock_enroll):
|
||||
def test_enrollment_for_full_course(self, mock_enroll):
|
||||
mock_enroll.side_effect = CourseFullError("Bad things happened")
|
||||
data.create_course_enrollment(self.user.username, unicode(self.course.id), 'honor', True)
|
||||
|
||||
@raises(CourseEnrollmentExistsError)
|
||||
@patch.object(CourseEnrollment, "enroll")
|
||||
def test_enrollment_for_closed_course(self, mock_enroll):
|
||||
def test_enrollment_for_enrolled_course(self, mock_enroll):
|
||||
mock_enroll.side_effect = AlreadyEnrolledError("Bad things happened")
|
||||
data.create_course_enrollment(self.user.username, unicode(self.course.id), 'honor', True)
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ class TestCreateAccount(TestCase):
|
||||
|
||||
@unittest.skipUnless(settings.FEATURES.get('AUTH_USE_SHIB'), "AUTH_USE_SHIB not set")
|
||||
@mock.patch.dict(settings.FEATURES, {'BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH': False, 'AUTOMATIC_AUTH_FOR_TESTING': False})
|
||||
def test_extauth_bypass_sending_activation_email_without_bypass(self):
|
||||
def test_extauth_bypass_sending_activation_email_without_bypass_1(self):
|
||||
"""
|
||||
Tests user creation without sending activation email when
|
||||
settings.FEATURES['BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH']=False and doing external auth
|
||||
@@ -260,7 +260,7 @@ class TestCreateAccount(TestCase):
|
||||
|
||||
@unittest.skipUnless(settings.FEATURES.get('AUTH_USE_SHIB'), "AUTH_USE_SHIB not set")
|
||||
@mock.patch.dict(settings.FEATURES, {'BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH': False, 'AUTOMATIC_AUTH_FOR_TESTING': False, 'SKIP_EMAIL_VALIDATION': True})
|
||||
def test_extauth_bypass_sending_activation_email_without_bypass(self):
|
||||
def test_extauth_bypass_sending_activation_email_without_bypass_2(self):
|
||||
"""
|
||||
Tests user creation without sending activation email when
|
||||
settings.FEATURES['BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH']=False and doing external auth
|
||||
|
||||
Reference in New Issue
Block a user