fix: Allow tests for Extracted & Builtin HTML XBlock (#36399)
Test HTML XBlock in both built-in and extracted modes to keep them in sync. Related to: https://github.com/openedx/edx-platform/issues/36283
This commit is contained in:
@@ -494,8 +494,17 @@ class CourseInfoBlock(CourseInfoFields, HtmlBlockMixin): # lint-amnesty, pylint
|
||||
return datetime.today()
|
||||
|
||||
|
||||
HtmlBlock = (
|
||||
_ExtractedHtmlBlock if settings.USE_EXTRACTED_HTML_BLOCK
|
||||
else _BuiltInHtmlBlock
|
||||
)
|
||||
HtmlBlock = None
|
||||
|
||||
|
||||
def reset_class():
|
||||
"""Reset class as per django settings flag"""
|
||||
global HtmlBlock
|
||||
HtmlBlock = (
|
||||
_ExtractedHtmlBlock if settings.USE_EXTRACTED_HTML_BLOCK
|
||||
else _BuiltInHtmlBlock
|
||||
)
|
||||
return HtmlBlock
|
||||
|
||||
reset_class()
|
||||
HtmlBlock.__name__ = "HtmlBlock"
|
||||
|
||||
Reference in New Issue
Block a user