Commit 9c85d920 by Calen Pennington

Fixing tests created on master

parent 1f593428
...@@ -276,10 +276,11 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): ...@@ -276,10 +276,11 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
course = ms.get_item(location) course = ms.get_item(location)
metadata = own_metadata(course)
# add a bool piece of unknown metadata so we can verify we don't throw an exception # add a bool piece of unknown metadata so we can verify we don't throw an exception
course.metadata['new_metadata'] = True metadata['new_metadata'] = True
ms.update_metadata(location, course.metadata) ms.update_metadata(location, metadata)
print 'Exporting to tempdir = {0}'.format(root_dir) print 'Exporting to tempdir = {0}'.format(root_dir)
......
...@@ -135,6 +135,9 @@ class CapaModule(XModule): ...@@ -135,6 +135,9 @@ class CapaModule(XModule):
# see comment on randomization_bin # see comment on randomization_bin
self.seed = randomization_bin(system.seed, self.location.url) self.seed = randomization_bin(system.seed, self.location.url)
if self.max_attempts == '':
self.max_attempts = None
# Need the problem location in openendedresponse to send out. Adding # Need the problem location in openendedresponse to send out. Adding
# it to the system here seems like the least clunky way to get it # it to the system here seems like the least clunky way to get it
# there. # there.
......
...@@ -28,13 +28,11 @@ class AnnotatableModuleTestCase(unittest.TestCase): ...@@ -28,13 +28,11 @@ 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>
''' '''
definition = { 'data': sample_xml }
descriptor = Mock() descriptor = Mock()
instance_state = None module_data = {'data': sample_xml}
shared_state = None
def setUp(self): def setUp(self):
self.annotatable = AnnotatableModule(test_system(), self.location, self.definition, self.descriptor, self.instance_state, self.shared_state) self.annotatable = AnnotatableModule(test_system(), self.location, self.descriptor, self.module_data)
def test_annotation_data_attr(self): def test_annotation_data_attr(self):
el = etree.fromstring('<annotation title="bar" body="foo" problem="0">test</annotation>') el = etree.fromstring('<annotation title="bar" body="foo" problem="0">test</annotation>')
......
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