Merge pull request #1610 from MITx/fix/diana/fix-annotation-tests

Update correctmap to handle partially correct answers, and
This commit is contained in:
Jay Zoldak
2013-03-06 14:11:47 -08:00
2 changed files with 3 additions and 3 deletions

View File

@@ -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):

View File

@@ -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)