Commit 009b3e9c by Ned Batchelder

Merge pull request #1403 from edx/ned/small-dictfielddata-cleanups

Simple cleanups of DictFieldData
parents 19d3e31d d3c7c083
...@@ -13,7 +13,6 @@ from xmodule.modulestore import Location ...@@ -13,7 +13,6 @@ from xmodule.modulestore import Location
from . import get_test_system from . import get_test_system
class AnnotatableModuleTestCase(unittest.TestCase): class AnnotatableModuleTestCase(unittest.TestCase):
location = Location(["i4x", "edX", "toy", "annotatable", "guided_discussion"])
sample_xml = ''' sample_xml = '''
<annotatable display_name="Iliad"> <annotatable display_name="Iliad">
<instructions>Read the text.</instructions> <instructions>Read the text.</instructions>
...@@ -30,14 +29,12 @@ class AnnotatableModuleTestCase(unittest.TestCase): ...@@ -30,14 +29,12 @@ class AnnotatableModuleTestCase(unittest.TestCase):
<annotation title="footnote" body="the end">The Iliad of Homer by Samuel Butler</annotation> <annotation title="footnote" body="the end">The Iliad of Homer by Samuel Butler</annotation>
</annotatable> </annotatable>
''' '''
descriptor = Mock()
field_data = DictFieldData({'data': sample_xml})
def setUp(self): def setUp(self):
self.annotatable = AnnotatableModule( self.annotatable = AnnotatableModule(
self.descriptor, Mock(),
get_test_system(), get_test_system(),
self.field_data, DictFieldData({'data': self.sample_xml}),
ScopeIds(None, None, None, None) ScopeIds(None, None, None, None)
) )
......
...@@ -68,6 +68,8 @@ NOT_STUDIO_EDITABLE = ( ...@@ -68,6 +68,8 @@ NOT_STUDIO_EDITABLE = (
class TestXBlockWrapper(object): class TestXBlockWrapper(object):
"""Helper methods used in test case classes below."""
@property @property
def leaf_module_runtime(self): def leaf_module_runtime(self):
runtime = ModuleSystem( runtime = ModuleSystem(
......
...@@ -28,8 +28,6 @@ from xmodule.xml_module import is_pointer_tag, name_to_pathname, deserialize_fie ...@@ -28,8 +28,6 @@ from xmodule.xml_module import is_pointer_tag, name_to_pathname, deserialize_fie
from xmodule.modulestore import Location from xmodule.modulestore import Location
from xblock.fields import Scope, String, Boolean, Float, List, Integer, ScopeIds from xblock.fields import Scope, String, Boolean, Float, List, Integer, ScopeIds
from xblock.field_data import DictFieldData
from xmodule.modulestore.inheritance import InheritanceKeyValueStore from xmodule.modulestore.inheritance import InheritanceKeyValueStore
from xblock.runtime import DbModel from xblock.runtime import DbModel
......
...@@ -12,8 +12,6 @@ from django.conf import settings ...@@ -12,8 +12,6 @@ from django.conf import settings
from mitxmako.shortcuts import render_to_string from mitxmako.shortcuts import render_to_string
from xblock.field_data import DictFieldData
import logging import logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment