Skip to content

Commit

Permalink
update tests, generate fixtures again
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinschaper committed Jun 3, 2024
1 parent 4baeb94 commit d5ca215
Show file tree
Hide file tree
Showing 11 changed files with 149 additions and 146 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- subject_label: Disease to Phenotype
object_label: Phenotype from Disease
object_label: Phenotype to Disease
category: "biolink:DiseaseToPhenotypicFeatureAssociation"
- subject_label: Gene to Phenotype
object_label: Phenotype to Gene
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/fixtures/association_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def association_counts():
return {
"items": [
{
"label": "Phenotype from Disease",
"label": "Phenotype to Disease",
"count": 3932,
"category": "biolink:DiseaseToPhenotypicFeatureAssociation",
},
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/fixtures/association_counts_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
def association_counts_response():
return {
"responseHeader": {
"QTime": 0,
"QTime": 1,
"params": {
"facet.query": [
'(category:"biolink:DiseaseToPhenotypicFeatureAssociation") AND (subject:"MONDO:0020121" OR subject_closure:"MONDO:0020121")',
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/fixtures/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def node():
},
"association_counts": [
{
"label": "Phenotype from Disease",
"label": "Phenotype to Disease",
"count": 3932,
"category": "biolink:DiseaseToPhenotypicFeatureAssociation",
},
Expand Down
6 changes: 3 additions & 3 deletions backend/tests/fixtures/object_formatted.py

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions backend/tests/integration/test_solr_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ def test_association_counts_for_disease():
assert len(association_counts.items) > 0

causal_genes = [ac for ac in association_counts.items if ac.category == "biolink:CausalGeneToDiseaseAssociation"][0]
assert causal_genes.label == "Causal Genes"
assert causal_genes.label == "Causal Gene"

Check warning on line 112 in backend/tests/integration/test_solr_search.py

View check run for this annotation

Codecov / codecov/patch

backend/tests/integration/test_solr_search.py#L112

Added line #L112 was not covered by tests

disease_phenotype = [
ac for ac in association_counts.items if ac.category == "biolink:DiseaseToPhenotypicFeatureAssociation"
][0]
assert disease_phenotype.label == "Phenotypes"
assert disease_phenotype.label == "Phenotype to Disease"

Check warning on line 117 in backend/tests/integration/test_solr_search.py

View check run for this annotation

Codecov / codecov/patch

backend/tests/integration/test_solr_search.py#L117

Added line #L117 was not covered by tests


def test_association_counts_for_eds():
Expand All @@ -133,12 +133,12 @@ def test_association_counts_for_phenotype():
disease_phenotype = [
ac for ac in association_counts.items if ac.category == "biolink:DiseaseToPhenotypicFeatureAssociation"
][0]
assert disease_phenotype.label == "Diseases"
assert disease_phenotype.label == "Disease to Phenotype"

Check warning on line 136 in backend/tests/integration/test_solr_search.py

View check run for this annotation

Codecov / codecov/patch

backend/tests/integration/test_solr_search.py#L136

Added line #L136 was not covered by tests

gene_phenotype = [
ac for ac in association_counts.items if ac.category == "biolink:GeneToPhenotypicFeatureAssociation"
][0]
assert gene_phenotype.label == "Genes"
assert gene_phenotype.label == "Gene to Phenotype"

Check warning on line 141 in backend/tests/integration/test_solr_search.py

View check run for this annotation

Codecov / codecov/patch

backend/tests/integration/test_solr_search.py#L141

Added line #L141 was not covered by tests


def test_association_table():
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/unit/test_solr_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_build_association_multiple_entites():
entity_filter = [fq for fq in query.filter_queries if fq.startswith("subject:")][0]
assert (
entity_filter
== 'subject:"MONDO\\:0020121" OR subject_closure:"MONDO\\:0020121" OR object:"MONDO\\:0020121" OR object_closure:"MONDO\\:0020121" OR subject:"HP\\:0000006" OR subject_closure:"HP\\:0000006" OR object:"HP\\:0000006" OR object_closure:"HP\\:0000006"'
== 'subject:"MONDO:0020121" OR subject_closure:"MONDO:0020121" OR object:"MONDO:0020121" OR object_closure:"MONDO:0020121" OR subject:"HP:0000006" OR subject_closure:"HP:0000006" OR object:"HP:0000006" OR object_closure:"HP:0000006"'
)


Expand Down
2 changes: 1 addition & 1 deletion frontend/fixtures/association-counts.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"items": [
{
"label": "Phenotype from Disease",
"label": "Phenotype to Disease",
"count": 3932,
"category": "biolink:DiseaseToPhenotypicFeatureAssociation"
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/fixtures/node.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
},
"association_counts": [
{
"label": "Phenotype from Disease",
"label": "Phenotype to Disease",
"count": 3932,
"category": "biolink:DiseaseToPhenotypicFeatureAssociation"
},
Expand Down
Loading

0 comments on commit d5ca215

Please sign in to comment.