@@ -204,7 +204,7 @@ def test_post_quiz_example_with_write_quiz(self):
204
204
)
205
205
206
206
def test_post_quiz_example_with_multiple_meanings (self ):
207
- """Test that the post quiz example is not repeated if an examples has multiple meanings."""
207
+ """Test that the post quiz example is not repeated if an example has multiple meanings."""
208
208
hi = self .create_concept ("hi" , dict (nl = "hoi" , fi = "terve" , example = "hi alice" ))
209
209
self .create_concept ("hi alice" , dict (fi = "Terve Alice!" , nl = ["Hoi Alice!" , "Hallo Alice!" ]))
210
210
quiz = create_quizzes (FI_NL , (WRITE ,), hi ).pop ()
@@ -229,6 +229,19 @@ def test_post_quiz_example_with_colloquial_labels(self):
229
229
feedback (Evaluation .CORRECT , self .guess ),
230
230
)
231
231
232
+ def test_post_quiz_example_with_synonyms (self ):
233
+ """Test that the post quiz example is for the correct synonym."""
234
+ near = self .create_concept ("near" , dict (fi = "lähellä" , nl = ["dichtbij" , "in de buurt" ], example = "is is near" ))
235
+ self .create_concept ("is is near" , dict (fi = "Se on lähellä." , nl = ["Het is dichtbij." , "Het is in de buurt." ]))
236
+ quiz = create_quizzes (FI_NL , (READ ,), near ).pop ()
237
+ feedback = Feedback (quiz , FI_NL )
238
+ self .assertEqual (
239
+ Feedback .CORRECT + "[secondary]Another correct answer is "
240
+ "'[link=https://en.wiktionary.org/wiki/dichtbij]dichtbij[/link]'.[/secondary]\n "
241
+ "[secondary]Example: 'Se on lähellä.' meaning 'Het is dichtbij.' and 'Het is in de buurt.'[/secondary]\n " ,
242
+ feedback (Evaluation .CORRECT , Label (NL , "in de buurt" )),
243
+ )
244
+
232
245
233
246
class LinkifyTest (TestCase ):
234
247
"""Unit tests for the linkify method."""
0 commit comments