From 8aae7bcee76f47d348b755bf3cd301f79c719832 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 31 Jul 2016 10:10:17 -0400 Subject: [PATCH] Fix redefined-function errors --- common/djangoapps/enrollment/tests/test_data.py | 4 ++-- common/djangoapps/student/tests/test_create_account.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/djangoapps/enrollment/tests/test_data.py b/common/djangoapps/enrollment/tests/test_data.py index 0ba3621d47..a8143488f4 100644 --- a/common/djangoapps/enrollment/tests/test_data.py +++ b/common/djangoapps/enrollment/tests/test_data.py @@ -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) diff --git a/common/djangoapps/student/tests/test_create_account.py b/common/djangoapps/student/tests/test_create_account.py index a712274e9e..d7277b82fd 100644 --- a/common/djangoapps/student/tests/test_create_account.py +++ b/common/djangoapps/student/tests/test_create_account.py @@ -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