Make XModuleDescriptor use __init__ from XBlock
Fixes JIRA LMS-203
This commit is contained in:
@@ -8,14 +8,13 @@ from xmodule.modulestore import Location
|
||||
from . import test_system
|
||||
|
||||
class HtmlModuleSubstitutionTestCase(unittest.TestCase):
|
||||
location = Location(["i4x", "edX", "toy", "html", "simple_html"])
|
||||
descriptor = Mock()
|
||||
|
||||
def test_substitution_works(self):
|
||||
sample_xml = '''%%USER_ID%%'''
|
||||
module_data = {'data': sample_xml}
|
||||
module_system = test_system()
|
||||
module = HtmlModule(module_system, self.location, self.descriptor, module_data)
|
||||
module = HtmlModule(module_system, self.descriptor, module_data)
|
||||
self.assertEqual(module.get_html(), str(module_system.anonymous_student_id))
|
||||
|
||||
|
||||
@@ -26,7 +25,7 @@ class HtmlModuleSubstitutionTestCase(unittest.TestCase):
|
||||
</html>
|
||||
'''
|
||||
module_data = {'data': sample_xml}
|
||||
module = HtmlModule(test_system(), self.location, self.descriptor, module_data)
|
||||
module = HtmlModule(test_system(), self.descriptor, module_data)
|
||||
self.assertEqual(module.get_html(), sample_xml)
|
||||
|
||||
|
||||
@@ -35,6 +34,6 @@ class HtmlModuleSubstitutionTestCase(unittest.TestCase):
|
||||
module_data = {'data': sample_xml}
|
||||
module_system = test_system()
|
||||
module_system.anonymous_student_id = None
|
||||
module = HtmlModule(module_system, self.location, self.descriptor, module_data)
|
||||
module = HtmlModule(module_system, self.descriptor, module_data)
|
||||
self.assertEqual(module.get_html(), sample_xml)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user