Remove XML-backed course-specific test.
This commit is contained in:
committed by
Clinton Blackburn
parent
134fb9c269
commit
2090f07344
@@ -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."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user