Commit 5c3dfd92 by Diana Huang

Update correctmap to handle partially correct answers, and

fix annotation tests so that they use the new test_system functionality
parent 05211d4f
......@@ -95,7 +95,7 @@ class CorrectMap(object):
def is_correct(self, answer_id):
if answer_id in self.cmap:
return self.cmap[answer_id]['correctness'] == 'correct'
return self.cmap[answer_id]['correctness'] in ['correct', 'partially-correct']
return None
def is_queued(self, answer_id):
......
......@@ -34,7 +34,7 @@ class AnnotatableModuleTestCase(unittest.TestCase):
shared_state = None
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.definition, self.descriptor, self.instance_state, self.shared_state)
def test_annotation_data_attr(self):
el = etree.fromstring('<annotation title="bar" body="foo" problem="0">test</annotation>')
......@@ -126,4 +126,4 @@ class AnnotatableModuleTestCase(unittest.TestCase):
xmltree = etree.fromstring('<annotatable>foo</annotatable>')
actual = self.annotatable._extract_instructions(xmltree)
self.assertIsNone(actual)
\ No newline at end of file
self.assertIsNone(actual)
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