Merge pull request #1610 from MITx/fix/diana/fix-annotation-tests
Update correctmap to handle partially correct answers, and
This commit is contained in:
@@ -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)
|
||||
self.assertIsNone(actual)
|
||||
|
||||
Reference in New Issue
Block a user