diff --git a/src/CreeDictionary/tests/API_tests/model_test.py b/src/CreeDictionary/tests/API_tests/model_test.py index feed3f0c5..fe91c3e50 100644 --- a/src/CreeDictionary/tests/API_tests/model_test.py +++ b/src/CreeDictionary/tests/API_tests/model_test.py @@ -262,7 +262,9 @@ def test_lemma_ranking_most_frequent_word(): # the English sleep should many Cree words. But nipâw should show first because # it undoubtedly has the highest frequency results = search(query="sees").presentation_results() - assert results[0].wordform.text == "wâpahtam" + top_3_texts = set([ result.wordform.text for result in results[0:3]]) + assert "wâpahtam" in top_3_texts + assert "wâpamêw" in top_3_texts @pytest.mark.django_db