Commit a08447e4 by Calen Pennington Committed by GitHub

Merge pull request #15883 from edx/ret/remove-old-test

Remove a test that was only valid for XML-backed courses
parents 3131790a bfd7241e
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment