Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
8aae7bce
Commit
8aae7bce
authored
Jul 31, 2016
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix redefined-function errors
parent
e3cd261e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
common/djangoapps/enrollment/tests/test_data.py
+2
-2
common/djangoapps/student/tests/test_create_account.py
+2
-2
No files found.
common/djangoapps/enrollment/tests/test_data.py
View file @
8aae7bce
...
@@ -244,13 +244,13 @@ class EnrollmentDataTest(ModuleStoreTestCase):
...
@@ -244,13 +244,13 @@ class EnrollmentDataTest(ModuleStoreTestCase):
@raises
(
CourseEnrollmentFullError
)
@raises
(
CourseEnrollmentFullError
)
@patch.object
(
CourseEnrollment
,
"enroll"
)
@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"
)
mock_enroll
.
side_effect
=
CourseFullError
(
"Bad things happened"
)
data
.
create_course_enrollment
(
self
.
user
.
username
,
unicode
(
self
.
course
.
id
),
'honor'
,
True
)
data
.
create_course_enrollment
(
self
.
user
.
username
,
unicode
(
self
.
course
.
id
),
'honor'
,
True
)
@raises
(
CourseEnrollmentExistsError
)
@raises
(
CourseEnrollmentExistsError
)
@patch.object
(
CourseEnrollment
,
"enroll"
)
@patch.object
(
CourseEnrollment
,
"enroll"
)
def
test_enrollment_for_
clos
ed_course
(
self
,
mock_enroll
):
def
test_enrollment_for_
enroll
ed_course
(
self
,
mock_enroll
):
mock_enroll
.
side_effect
=
AlreadyEnrolledError
(
"Bad things happened"
)
mock_enroll
.
side_effect
=
AlreadyEnrolledError
(
"Bad things happened"
)
data
.
create_course_enrollment
(
self
.
user
.
username
,
unicode
(
self
.
course
.
id
),
'honor'
,
True
)
data
.
create_course_enrollment
(
self
.
user
.
username
,
unicode
(
self
.
course
.
id
),
'honor'
,
True
)
...
...
common/djangoapps/student/tests/test_create_account.py
View file @
8aae7bce
...
@@ -251,7 +251,7 @@ class TestCreateAccount(TestCase):
...
@@ -251,7 +251,7 @@ class TestCreateAccount(TestCase):
@unittest.skipUnless
(
settings
.
FEATURES
.
get
(
'AUTH_USE_SHIB'
),
"AUTH_USE_SHIB not set"
)
@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
})
@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
Tests user creation without sending activation email when
settings.FEATURES['BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH']=False and doing external auth
settings.FEATURES['BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH']=False and doing external auth
...
@@ -260,7 +260,7 @@ class TestCreateAccount(TestCase):
...
@@ -260,7 +260,7 @@ class TestCreateAccount(TestCase):
@unittest.skipUnless
(
settings
.
FEATURES
.
get
(
'AUTH_USE_SHIB'
),
"AUTH_USE_SHIB not set"
)
@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
})
@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
Tests user creation without sending activation email when
settings.FEATURES['BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH']=False and doing external auth
settings.FEATURES['BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH']=False and doing external auth
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment