Allow Studio override of Feature Based Enrollment status for individual xblocks

This commit is contained in:
Calen Pennington
2018-10-18 09:34:04 -04:00
parent 99f8918b74
commit f9dd7fe223
6 changed files with 33 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ Test the partitions and partitions service
"""
from unittest import TestCase
from mock import Mock
from mock import Mock, patch
from opaque_keys.edx.locator import CourseLocator
from stevedore.extension import Extension, ExtensionManager
@@ -434,6 +434,18 @@ class PartitionServiceBaseClass(PartitionTestCase):
def setUp(self):
super(PartitionServiceBaseClass, self).setUp()
content_gating_flag_patcher = patch(
'openedx.features.content_type_gating.partitions.CONTENT_TYPE_GATING_FLAG.is_enabled',
return_value=True,
).start()
self.addCleanup(content_gating_flag_patcher.stop)
content_gating_ui_flag_patcher = patch(
'openedx.features.content_type_gating.partitions.CONTENT_TYPE_GATING_STUDIO_UI_FLAG.is_enabled',
return_value=True,
).start()
self.addCleanup(content_gating_ui_flag_patcher.stop)
self.course = Mock(id=CourseLocator('org_0', 'course_0', 'run_0'))
self.partition_service = self._create_service("ma")