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
from . import get_test_system
class AnnotatableModuleTestCase(unittest.TestCase):
location = Location(["i4x", "edX", "toy", "annotatable", "guided_discussion"])
sample_xml = '''
<annotatable display_name="Iliad">
<instructions>Read the text.</instructions>
......@@ -30,14 +29,12 @@ class AnnotatableModuleTestCase(unittest.TestCase):
<annotation title="footnote" body="the end">The Iliad of Homer by Samuel Butler</annotation>
</annotatable>
'''
descriptor = Mock()
field_data = DictFieldData({'data': sample_xml})
def setUp(self):
self.annotatable = AnnotatableModule(
self.descriptor,
Mock(),
get_test_system(),
self.field_data,
DictFieldData({'data': self.sample_xml}),
ScopeIds(None, None, None, None)
)
......
......@@ -68,6 +68,8 @@ NOT_STUDIO_EDITABLE = (
class TestXBlockWrapper(object):
"""Helper methods used in test case classes below."""
@property
def leaf_module_runtime(self):
runtime = ModuleSystem(
......
......@@ -28,8 +28,6 @@ from xmodule.xml_module import is_pointer_tag, name_to_pathname, deserialize_fie
from xmodule.modulestore import Location
from xblock.fields import Scope, String, Boolean, Float, List, Integer, ScopeIds
from xblock.field_data import DictFieldData
from xmodule.modulestore.inheritance import InheritanceKeyValueStore
from xblock.runtime import DbModel
......
......@@ -12,8 +12,6 @@ from django.conf import settings
from mitxmako.shortcuts import render_to_string
from xblock.field_data import DictFieldData
import logging
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