Skip to content

Commit

Permalink
tests: updating tests with fusor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
katiestahl committed Aug 22, 2024
1 parent 6c672bd commit d56bff0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion server/tests/integration/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ async def test_build_templated_sequence(
"refgetAccession": "",
"type": "SequenceReference",
},
"start": 154171414,
"start": 154171415,
"end": 154171417,
},
"strand": -1,
Expand Down
17 changes: 11 additions & 6 deletions server/tests/integration/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,16 @@ def check_genomic_coords_response(response: dict, expected_response: dict):
assert "warnings" in response
assert set(response["warnings"]) == set(expected_response["warnings"])
return
assert response["coordinates_data"] == expected_response["coordinates_data"]
actual_coord_data = response["coordinates_data"]
expected_coord_data = expected_response["coordinates_data"]

assert actual_coord_data.get("gene") == expected_coord_data.get("gene")
assert actual_coord_data["genomic_ac"] == expected_coord_data.get("genomic_ac")
assert actual_coord_data.get("tx_ac") == expected_coord_data.get("tx_ac")
assert actual_coord_data.get("seg_start") == expected_coord_data.get(
"seg_start"
)
assert actual_coord_data.get("seg_end") == expected_coord_data.get("seg_end")

await check_response(
"/api/utilities/get_genomic?transcript=NM_002529.3&exon_start=1&exon_end=6",
Expand Down Expand Up @@ -206,11 +215,7 @@ def check_coords_response(response: dict, expected_response: dict):

await check_response(
"/api/utilities/get_exon?chromosome=NC_000001.11&start=154192131&gene=TPM3",
{
"warnings": [
"Unable to find mane data for NC_000001.11 with position 154192130 on gene TPM3"
]
},
{"warnings": ["Must find exactly one row for genomic data, but found: 0"]},
check_coords_response,
)

Expand Down

0 comments on commit d56bff0

Please sign in to comment.