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
a08447e4
Commit
a08447e4
authored
Aug 23, 2017
by
Calen Pennington
Committed by
GitHub
Aug 23, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15883 from edx/ret/remove-old-test
Remove a test that was only valid for XML-backed courses
parents
3131790a
bfd7241e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
46 deletions
+0
-46
common/djangoapps/student/tests/test_bulk_email_settings.py
+0
-46
No files found.
common/djangoapps/student/tests/test_bulk_email_settings.py
View file @
a08447e4
...
...
@@ -84,49 +84,3 @@ class TestStudentDashboardEmailView(SharedModuleStoreTestCase):
# if this course isn't authorized
response
=
self
.
client
.
get
(
self
.
url
)
self
.
assertIn
(
self
.
email_modal_link
,
response
.
content
)
@unittest.skipUnless
(
settings
.
ROOT_URLCONF
==
'lms.urls'
,
'Test only valid in lms'
)
class
TestStudentDashboardEmailViewXMLBacked
(
SharedModuleStoreTestCase
):
"""
Check for email view on student dashboard, with XML backed course.
"""
MODULESTORE
=
TEST_DATA_MIXED_MODULESTORE
def
setUp
(
self
):
super
(
TestStudentDashboardEmailViewXMLBacked
,
self
)
.
setUp
()
self
.
course_name
=
'edX/toy/2012_Fall'
# Create student account
student
=
UserFactory
.
create
()
CourseEnrollmentFactory
.
create
(
user
=
student
,
course_id
=
CourseKey
.
from_string
(
self
.
course_name
)
)
self
.
client
.
login
(
username
=
student
.
username
,
password
=
"test"
)
self
.
url
=
reverse
(
'dashboard'
)
# URL for email settings modal
self
.
email_modal_link
=
(
'<a href="#email-settings-modal" class="action action-email-settings" rel="leanModal" '
'data-course-id="{org}/{num}/{name}" data-course-number="{num}" '
'data-dashboard-index="0" data-optout="False">Email Settings</a>'
)
.
format
(
org
=
'edX'
,
num
=
'toy'
,
name
=
'2012_Fall'
,
)
def
test_email_flag_true_xml_store
(
self
):
BulkEmailFlag
.
objects
.
create
(
enabled
=
True
,
require_course_email_auth
=
False
)
# The flag is enabled, and since REQUIRE_COURSE_EMAIL_AUTH is False, all courses should
# be authorized to use email. But the course is not Mongo-backed (should not work)
response
=
self
.
client
.
get
(
self
.
url
)
self
.
assertNotIn
(
self
.
email_modal_link
,
response
.
content
)
def
test_email_flag_false_xml_store
(
self
):
BulkEmailFlag
.
objects
.
create
(
enabled
=
False
,
require_course_email_auth
=
False
)
# Email disabled, shouldn't see link.
response
=
self
.
client
.
get
(
self
.
url
)
self
.
assertNotIn
(
self
.
email_modal_link
,
response
.
content
)
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