Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update association entity test to handle the case where the matched I…
Browse files Browse the repository at this point in the history
…D is in the disease_context_qualifier slot
kevinschaper committed Jan 14, 2025
1 parent a716bdd commit 9ee736d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions backend/tests/integration/test_solr_association.py
Original file line number Diff line number Diff line change
@@ -68,10 +68,17 @@ def test_entity():
assert response
assert response.total > 50
for association in response.items:
if association.subject_closure is None or len(association.subject_closure) == 0:

if (
association.subject_closure is None or len(association.subject_closure) == 0
) and association.disease_context_qualifier is None:
assert "MONDO:0007947" in association.object_closure
elif association.object_closure is None or len(association.object_closure) == 0:
elif (
association.object_closure is None or len(association.object_closure) == 0
) and association.disease_context_qualifier is None:
assert "MONDO:0007947" in association.subject_closure
elif association.disease_context_qualifier is not None:
assert "MONDO:0007947" in association.disease_context_qualifier_closure
else:
assert "MONDO:0007947" in association.subject_closure or "MONDO:0007947" in association.object_closure

0 comments on commit 9ee736d

Please sign in to comment.