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:
Irtaza Akram
2025-08-15 20:42:30 +05:00
committed by GitHub
parent 55a3757107
commit bbfdce0f9a
2 changed files with 96 additions and 35 deletions

View File

@@ -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"