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
2090f073
Commit
2090f073
authored
Dec 22, 2015
by
John Eskew
Committed by
Clinton Blackburn
May 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove XML-backed course-specific test.
parent
134fb9c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
26 deletions
+0
-26
lms/djangoapps/bulk_email/tests/test_forms.py
+0
-26
No files found.
lms/djangoapps/bulk_email/tests/test_forms.py
View file @
2090f073
...
...
@@ -127,32 +127,6 @@ class CourseAuthorizationFormTest(ModuleStoreTestCase):
form
.
save
()
class
CourseAuthorizationXMLFormTest
(
ModuleStoreTestCase
):
"""Check that XML courses cannot be authorized for email."""
MODULESTORE
=
TEST_DATA_MIXED_TOY_MODULESTORE
@patch.dict
(
settings
.
FEATURES
,
{
'ENABLE_INSTRUCTOR_EMAIL'
:
True
,
'REQUIRE_COURSE_EMAIL_AUTH'
:
True
})
def
test_xml_course_authorization
(
self
):
course_id
=
SlashSeparatedCourseKey
(
'edX'
,
'toy'
,
'2012_Fall'
)
# Assert this is an XML course
self
.
assertEqual
(
modulestore
()
.
get_modulestore_type
(
course_id
),
ModuleStoreEnum
.
Type
.
xml
)
form_data
=
{
'course_id'
:
course_id
.
to_deprecated_string
(),
'email_enabled'
:
True
}
form
=
CourseAuthorizationAdminForm
(
data
=
form_data
)
# Validation shouldn't work
self
.
assertFalse
(
form
.
is_valid
())
msg
=
u"Course Email feature is only available for courses authored in Studio. "
msg
+=
u'"{0}" appears to be an XML backed course.'
.
format
(
course_id
.
to_deprecated_string
())
self
.
assertEquals
(
msg
,
form
.
_errors
[
'course_id'
][
0
])
# pylint: disable=protected-access
with
self
.
assertRaisesRegexp
(
ValueError
,
"The CourseAuthorization could not be created because the data didn't validate."
):
form
.
save
()
class
CourseEmailTemplateFormTest
(
ModuleStoreTestCase
):
"""Test the CourseEmailTemplateForm that is used in the Django admin subsystem."""
...
...
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