Skip to content

Commit

Permalink
Fixed unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
fbanados committed Jul 16, 2024
1 parent 829100c commit 2ec603a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/CreeDictionary/tests/API_tests/model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def test_search_for_exact_lemma(lemma: Wordform):
exact_match = exact_matches.pop()
assert exact_match.source_language_match == lemma.text
assert not exact_match.preverbs
# todo: enable the two lines below when #230 is fixed
# the two lines below are enabled after #230 was fixed
# https://github.com/UAlbertaALTLab/morphodict/issues/230
# or there will be flaky local tests and ci tests
# assert len(exact_match.definitions) >= 1
# assert all(len(dfn.source_ids) >= 1 for dfn in exact_match.definitions)
# or there would be flaky local tests and ci tests
assert len(exact_match.wordform.definitions.all()) >= 1
assert all(len(dfn.source_ids) >= 1 for dfn in exact_match.wordform.definitions.all())


@pytest.mark.django_db
Expand Down
2 changes: 1 addition & 1 deletion src/CreeDictionary/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ def lemmas():
"""
Strategy to return lemmas from the database.
"""
return WordformStrategy(is_lemma=True)
return WordformStrategy(is_lemma=True,raw_analysis__isnull=False)

0 comments on commit 2ec603a

Please sign in to comment.