Merge pull request #11042 from edx/jeskew/xml_removal

Remove XML modulestore code from most tests.
This commit is contained in:
John Eskew
2016-04-27 11:20:02 -04:00
36 changed files with 190 additions and 510 deletions

View File

@@ -12,7 +12,7 @@ from opaque_keys.edx.locations import SlashSeparatedCourseKey
from bulk_email.models import CourseAuthorization
from xmodule.modulestore.tests.django_utils import (
TEST_DATA_MIXED_TOY_MODULESTORE, SharedModuleStoreTestCase
TEST_DATA_MIXED_MODULESTORE, SharedModuleStoreTestCase
)
from student.tests.factories import AdminFactory
from xmodule.modulestore.tests.factories import CourseFactory
@@ -112,7 +112,7 @@ class TestNewInstructorDashboardEmailViewXMLBacked(SharedModuleStoreTestCase):
Check for email view on the new instructor dashboard
"""
MODULESTORE = TEST_DATA_MIXED_TOY_MODULESTORE
MODULESTORE = TEST_DATA_MIXED_MODULESTORE
@classmethod
def setUpClass(cls):

View File

@@ -66,10 +66,9 @@ def bulk_email_is_enabled_for_course(course_id):
"""
bulk_email_enabled_globally = (settings.FEATURES['ENABLE_INSTRUCTOR_EMAIL'] is True)
is_studio_course = (modulestore().get_modulestore_type(course_id) != ModuleStoreEnum.Type.xml)
bulk_email_enabled_for_course = CourseAuthorization.instructor_email_enabled(course_id)
if bulk_email_enabled_globally and is_studio_course and bulk_email_enabled_for_course:
if bulk_email_enabled_globally and bulk_email_enabled_for_course:
return True
return False