refactor: remove unused MakoModuleDescriptor
This commit is contained in:
@@ -4,9 +4,8 @@ Code to handle mako templating for XModules and XBlocks.
|
||||
|
||||
|
||||
from web_fragments.fragment import Fragment
|
||||
from xblock.core import XBlock
|
||||
|
||||
from .x_module import DescriptorSystem, shim_xmodule_js, XModuleMixin
|
||||
from .x_module import DescriptorSystem, shim_xmodule_js
|
||||
|
||||
|
||||
class MakoDescriptorSystem(DescriptorSystem): # lint-amnesty, pylint: disable=abstract-method
|
||||
@@ -72,14 +71,3 @@ class MakoTemplateBlockBase:
|
||||
)
|
||||
shim_xmodule_js(fragment, self.js_module_name)
|
||||
return fragment
|
||||
|
||||
|
||||
@XBlock.needs("i18n")
|
||||
class MakoModuleDescriptor(MakoTemplateBlockBase, XModuleMixin): # pylint: disable=abstract-method
|
||||
"""
|
||||
Mixin to use for XModule descriptors.
|
||||
"""
|
||||
resources_dir = None
|
||||
|
||||
def get_html(self):
|
||||
return self.studio_view(None).content
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
""" Test mako_module.py """
|
||||
|
||||
|
||||
from unittest import TestCase
|
||||
from unittest.mock import Mock
|
||||
|
||||
import pytest
|
||||
|
||||
from xmodule.mako_module import MakoModuleDescriptor
|
||||
|
||||
|
||||
class MakoModuleTest(TestCase):
|
||||
""" Test MakoModuleDescriptor """
|
||||
|
||||
def test_render_template_check(self):
|
||||
mock_system = Mock()
|
||||
mock_system.render_template = None
|
||||
|
||||
with pytest.raises(TypeError):
|
||||
MakoModuleDescriptor(mock_system, {})
|
||||
|
||||
del mock_system.render_template
|
||||
|
||||
with pytest.raises(TypeError):
|
||||
MakoModuleDescriptor(mock_system, {})
|
||||
Reference in New Issue
Block a user