From d56bff01ca8d4c1359ff63d9ca4ba769fdd07358 Mon Sep 17 00:00:00 2001 From: Katie Stahl Date: Thu, 22 Aug 2024 14:02:01 -0400 Subject: [PATCH] tests: updating tests with fusor changes --- server/tests/integration/test_constructors.py | 2 +- server/tests/integration/test_utilities.py | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/server/tests/integration/test_constructors.py b/server/tests/integration/test_constructors.py index 38642863..b711ae27 100644 --- a/server/tests/integration/test_constructors.py +++ b/server/tests/integration/test_constructors.py @@ -220,7 +220,7 @@ async def test_build_templated_sequence( "refgetAccession": "", "type": "SequenceReference", }, - "start": 154171414, + "start": 154171415, "end": 154171417, }, "strand": -1, diff --git a/server/tests/integration/test_utilities.py b/server/tests/integration/test_utilities.py index c6b68881..c027335b 100644 --- a/server/tests/integration/test_utilities.py +++ b/server/tests/integration/test_utilities.py @@ -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", @@ -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, )