2121
2222
2323def test_hgvs_fetch_valid (client , setup_router_db ):
24- response = client .get (f"/api/v1/hgvs /fetch/{ VALID_ACCESSION } " )
24+ response = client .get (f"/api/v1/transcripts /fetch/{ VALID_ACCESSION } " )
2525
2626 assert response .status_code == 200
2727 assert response .text == '"GATTACAGATTACAGATTACAGATTACAGATTACAGATTACAGATTACA"'
@@ -31,51 +31,51 @@ def test_hgvs_fetch_invalid(client, setup_router_db):
3131 with patch .object (
3232 cdot .hgvs .dataproviders .ChainedSeqFetcher , "fetch_seq" , side_effect = HGVSDataNotAvailableError ()
3333 ) as p :
34- response = client .get (f"/api/v1/hgvs /fetch/{ SMALL_ACCESSION } " )
34+ response = client .get (f"/api/v1/transcripts /fetch/{ SMALL_ACCESSION } " )
3535 p .assert_called_once ()
3636 assert response .status_code == 404
3737
3838
3939def test_hgvs_validate_valid (client , setup_router_db ):
4040 with patch .object (cdot .hgvs .dataproviders .RESTDataProvider , "_get_transcript" , return_value = TEST_CDOT_TRANSCRIPT ):
4141 payload = {"variant" : VALID_VARIANT }
42- response = client .post ("/api/v1/hgvs /validate" , json = payload )
42+ response = client .post ("/api/v1/transcripts /validate" , json = payload )
4343 assert response .status_code == 200
4444
4545
4646def test_hgvs_validate_invalid (client , setup_router_db ):
4747 with patch .object (cdot .hgvs .dataproviders .RESTDataProvider , "_get_transcript" , return_value = TEST_CDOT_TRANSCRIPT ):
4848 payload = {"variant" : INVALID_VARIANT }
49- response = client .post ("/api/v1/hgvs /validate" , json = payload )
49+ response = client .post ("/api/v1/transcripts /validate" , json = payload )
5050
5151 assert response .status_code == 400
5252 assert "does not agree" in response .json ()["detail" ]
5353
5454
5555def test_hgvs_list_assemblies (client , setup_router_db ):
56- response = client .get ("/api/v1/hgvs /assemblies" )
56+ response = client .get ("/api/v1/transcripts /assemblies" )
5757 assert response .status_code == 200
5858 assert VALID_MAJOR_ASSEMBLY in response .json ()
5959
6060
6161def test_hgvs_accessions_major (client , setup_router_db ):
62- response = client .get (f"/api/v1/hgvs /{ VALID_MAJOR_ASSEMBLY } /accessions" )
62+ response = client .get (f"/api/v1/transcripts /{ VALID_MAJOR_ASSEMBLY } /accessions" )
6363 assert response .status_code == 200
6464 assert "NC_000001.11" in response .json ()
6565
6666
6767def test_hgvs_accessions_minor (client , setup_router_db ):
68- response = client .get (f"/api/v1/hgvs /{ VALID_MINOR_ASSEMBLY } /accessions" )
68+ response = client .get (f"/api/v1/transcripts /{ VALID_MINOR_ASSEMBLY } /accessions" )
6969 assert response .status_code == 404
7070
7171
7272def test_hgvs_accessions_invalid (client , setup_router_db ):
73- response = client .get (f"/api/v1/hgvs /{ INVALID_ASSEMBLY } /accessions" )
73+ response = client .get (f"/api/v1/transcripts /{ INVALID_ASSEMBLY } /accessions" )
7474 assert response .status_code == 404
7575
7676
7777def test_hgvs_genes (client , setup_router_db ):
78- response = client .get ("/api/v1/hgvs /genes" )
78+ response = client .get ("/api/v1/transcripts /genes" )
7979 assert response .status_code == 200
8080 assert VALID_GENE in response .json ()
8181
@@ -93,7 +93,7 @@ def test_hgvs_gene_info_valid(client, setup_router_db):
9393 "summary" : "This gene, etc" ,
9494 },
9595 )
96- response = client .get (f"/api/v1/hgvs /genes/{ VALID_GENE } " )
96+ response = client .get (f"/api/v1/transcripts /genes/{ VALID_GENE } " )
9797
9898 assert m .called
9999
@@ -108,7 +108,7 @@ def test_hgvs_gene_info_invalid(client, setup_router_db):
108108 "https://cdot.cc/gene/fnord" ,
109109 status_code = 404 ,
110110 )
111- response = client .get (f"/api/v1/hgvs /genes/{ INVALID_GENE } " )
111+ response = client .get (f"/api/v1/transcripts /genes/{ INVALID_GENE } " )
112112
113113 assert m .called
114114 assert response .status_code == 404
@@ -122,7 +122,7 @@ def test_hgvs_gene_transcript_valid(client, setup_router_db):
122122 json = {"results" : [{"hgnc" : f"{ VALID_GENE } " , "tx_ac" : VALID_TRANSCRIPT }]},
123123 )
124124
125- response = client .get (f"/api/v1/hgvs/ transcripts/gene/{ VALID_GENE } " )
125+ response = client .get (f"/api/v1/transcripts/gene/{ VALID_GENE } " )
126126 assert response .status_code == 200
127127 assert VALID_TRANSCRIPT in response .json ()
128128
@@ -131,15 +131,15 @@ def test_hgvs_gene_transcript_invalid(client, setup_router_db):
131131 with requests_mock .mock () as m :
132132 m .get (f"https://cdot.cc/transcripts/gene/{ INVALID_GENE } " , status_code = 404 )
133133
134- response = client .get (f"/api/v1/hgvs/ transcripts/gene/{ INVALID_GENE } " )
134+ response = client .get (f"/api/v1/transcripts/gene/{ INVALID_GENE } " )
135135
136136 assert m .called
137137 assert response .status_code == 404
138138
139139
140140def test_hgvs_transcript_valid (client , setup_router_db ):
141141 with patch .object (cdot .hgvs .dataproviders .RESTDataProvider , "_get_transcript" , return_value = TEST_CDOT_TRANSCRIPT ):
142- response = client .get (f"/api/v1/hgvs/ transcripts/{ VALID_TRANSCRIPT } " )
142+ response = client .get (f"/api/v1/transcripts/{ VALID_TRANSCRIPT } " )
143143
144144 assert response .status_code == 200
145145 assert response .json ()["hgnc" ] == VALID_GENE
@@ -149,7 +149,7 @@ def test_hgvs_transcript_invalid(client, setup_router_db):
149149 with requests_mock .mock () as m :
150150 m .get (f"https://cdot.cc/transcript/{ INVALID_TRANSCRIPT } " , status_code = 404 )
151151
152- response = client .get (f"/api/v1/hgvs/ transcripts/{ INVALID_TRANSCRIPT } " )
152+ response = client .get (f"/api/v1/transcripts/{ INVALID_TRANSCRIPT } " )
153153
154154 assert m .called
155155 assert response .status_code == 404
@@ -163,7 +163,7 @@ def test_hgvs_transcript_protein_valid(client, setup_router_db):
163163 json = {"biotype" : ["protein_coding" ], "gene_name" : "A2M" , "gene_vesion" : "2" , "protein" : "NP_000005.2" },
164164 )
165165
166- response = client .get (f"/api/v1/hgvs/ transcripts/protein/{ HAS_PROTEIN_ACCESSION } " )
166+ response = client .get (f"/api/v1/transcripts/protein/{ HAS_PROTEIN_ACCESSION } " )
167167
168168 assert m .called
169169
@@ -175,7 +175,7 @@ def test_hgvs_transcript_protein_no_protein(client, setup_router_db):
175175 with requests_mock .mock () as m :
176176 m .get (f"https://cdot.cc/transcript/{ SMALL_ACCESSION } " , status_code = 404 )
177177
178- response = client .get (f"/api/v1/hgvs/ transcripts/protein/{ SMALL_ACCESSION } " )
178+ response = client .get (f"/api/v1/transcripts/protein/{ SMALL_ACCESSION } " )
179179
180180 assert m .called
181181 assert response .status_code == 404
@@ -185,7 +185,7 @@ def test_hgvs_transcript_protein_invalid(client, setup_router_db):
185185 with requests_mock .mock () as m :
186186 m .get (f"https://cdot.cc/transcript/{ INVALID_ACCESSION } " , status_code = 404 )
187187
188- response = client .get (f"/api/v1/hgvs/ transcripts/protein/{ INVALID_ACCESSION } " )
188+ response = client .get (f"/api/v1/transcripts/protein/{ INVALID_ACCESSION } " )
189189
190190 assert m .called
191191 assert response .status_code == 404
0 commit comments