refactor: simplify tests a bit & add DEFAULT_ADVANCED_MODULES to test settings
This commit is contained in:
@@ -2969,9 +2969,8 @@ class TestComponentTemplates(CourseTestCase):
|
||||
|
||||
# Check for default advanced modules
|
||||
advanced_templates = self.get_templates_of_type("advanced")
|
||||
self.assertEqual(len(advanced_templates), len(settings.DEFAULT_ADVANCED_MODULES))
|
||||
advanced_module_titles = [t['display_name'] for t in advanced_templates]
|
||||
self.assertEqual(advanced_module_titles, self.default_advanced_modules_titles)
|
||||
advanced_module_keys = [t['category'] for t in advanced_templates]
|
||||
self.assertCountEqual(advanced_module_keys, settings.DEFAULT_ADVANCED_MODULES)
|
||||
|
||||
# Now fully disable video through XBlockConfiguration
|
||||
XBlockConfiguration.objects.create(name="video", enabled=False)
|
||||
|
||||
@@ -336,3 +336,13 @@ COURSE_LIVE_GLOBAL_CREDENTIALS["BIG_BLUE_BUTTON"] = {
|
||||
OPENEDX_LEARNING = {
|
||||
"MEDIA": {"BACKEND": "django.core.files.storage.InMemoryStorage", "OPTIONS": {"location": MEDIA_ROOT + "_private"}}
|
||||
}
|
||||
|
||||
DEFAULT_ADVANCED_MODULES = [
|
||||
'google-calendar',
|
||||
'google-document',
|
||||
'lti_consumer',
|
||||
'poll',
|
||||
'split_test',
|
||||
'survey',
|
||||
'word_cloud',
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user