@@ -65,21 +65,21 @@ class TextInputHintsTest(HintTest):
@data(
{'problem_id':u'1_2_1',u'choice':u'GermanyΩ',
'expected_string':u'<div class="feedback-hint-incorrect"><div class="hint-label">Incorrect: </div><div class="hint-text">I do not think so.Ω</div></div>'},
'expected_string':u'<div class="feedback-hint-incorrect"><div class="hint-label">Incorrect: </div><div class="hint-text">I do not think so.Ω</div></div>'},
{'problem_id':u'1_2_1',u'choice':u'franceΩ',
'expected_string':u'<div class="feedback-hint-correct"><div class="hint-label">Correct: </div><div class="hint-text">Viva la France!Ω</div></div>'},
'expected_string':u'<div class="feedback-hint-correct"><div class="hint-label">Correct: </div><div class="hint-text">Viva la France!Ω</div></div>'},
{'problem_id':u'1_2_1',u'choice':u'FranceΩ',
'expected_string':u'<div class="feedback-hint-correct"><div class="hint-label">Correct: </div><div class="hint-text">Viva la France!Ω</div></div>'},
'expected_string':u'<div class="feedback-hint-correct"><div class="hint-label">Correct: </div><div class="hint-text">Viva la France!Ω</div></div>'},
{'problem_id':u'1_2_1',u'choice':u'Mexico',
'expected_string':''},
{'problem_id':u'1_2_1',u'choice':u'USAΩ',
'expected_string':u'<div class="feedback-hint-correct"><div class="hint-label">Correct: </div><div class="hint-text">Less well known, but yes, there is a Paris, Texas.Ω</div></div>'},
'expected_string':u'<div class="feedback-hint-correct"><div class="hint-label">Correct: </div><div class="hint-text">Less well known, but yes, there is a Paris, Texas.Ω</div></div>'},
{'problem_id':u'1_2_1',u'choice':u'usaΩ',
'expected_string':u'<div class="feedback-hint-correct"><div class="hint-label">Correct: </div><div class="hint-text">Less well known, but yes, there is a Paris, Texas.Ω</div></div>'},
'expected_string':u'<div class="feedback-hint-correct"><div class="hint-label">Correct: </div><div class="hint-text">Less well known, but yes, there is a Paris, Texas.Ω</div></div>'},
{'problem_id':u'1_2_1',u'choice':u'uSAxΩ',
'expected_string':u''},
{'problem_id':u'1_2_1',u'choice':u'NICKLANDΩ',
'expected_string':u'<div class="feedback-hint-incorrect"><div class="hint-label">Incorrect: </div><div class="hint-text">The country name does not end in LANDΩ</div></div>'},
'expected_string':u'<div class="feedback-hint-incorrect"><div class="hint-label">Incorrect: </div><div class="hint-text">The country name does not end in LANDΩ</div></div>'},
{'problem_id':u'1_3_1',u'choice':u'Blue',
'expected_string':u'<div class="feedback-hint-correct"><div class="hint-label">Correct: </div><div class="hint-text">The red light is scattered by water molecules leaving only blue light.</div></div>'},
{'problem_id':u'1_3_1',u'choice':u'blue',
...
...
@@ -451,6 +451,40 @@ class MultpleChoiceHintsTest(HintTest):
@ddt
classMultpleChoiceHintsWithHtmlTest(HintTest):
"""
This class consists of a suite of test cases to be run on the multiple choice problem represented by the XML below.
'hint_label':'Incorrect','hints':[{'text':'Mushroom <img src="#" ale="#"/>is a fungus, not a fruit.'}]}
)
@data(
{'problem_id':u'1_2_1','choice':u'choice_0',
'expected_string':'<div class="feedback-hint-incorrect"><div class="hint-label">Incorrect: </div><div class="hint-text">Mushroom <img src="#" ale="#"/>is a fungus, not a fruit.</div></div>'},
{'problem_id':u'1_2_1','choice':u'choice_1',
'expected_string':'<div class="feedback-hint-incorrect"><div class="hint-label">Incorrect: </div><div class="hint-text">Potato is <img src="#" ale="#"/> not a fruit.</div></div>'},
{'problem_id':u'1_2_1','choice':u'choice_2',
'expected_string':'<div class="feedback-hint-correct"><div class="hint-label">Correct: </div><div class="hint-text"><a href="#">Apple</a> is a fruit.</div></div>'}