aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2024-01-12 16:28:59 +0300
committerBonfaceKilz2024-01-12 17:03:14 +0300
commit2418e965209c911dbd6f518c93cbe7d9b602ff1b (patch)
tree9fbb787805151ecade835536cdf391838a5a0864
parente88c170135284732a0d0ce231caa3811eafab6c6 (diff)
downloadgenenetwork2-2418e965209c911dbd6f518c93cbe7d9b602ff1b.tar.gz
Switch NCBI link from http to https in failing test and RDF query.
* gn2/tests/wqflask/show_trait/test_show_trait.py (test_get_ncbi_summary_request): Replace "http://eutils.ncbi.nlm.nih.gov" with "https://eutils.ncbi.nlm.nih.gov" * gn2/wqflask/views.py (get_probeset): Ditto. Co-authored-by: Alexander Kabui <Alexanderkabua@gmail.com> Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rw-r--r--gn2/tests/wqflask/show_trait/test_show_trait.py2
-rw-r--r--gn2/wqflask/views.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/gn2/tests/wqflask/show_trait/test_show_trait.py b/gn2/tests/wqflask/show_trait/test_show_trait.py
index 51b0c82c..e4d2f597 100644
--- a/gn2/tests/wqflask/show_trait/test_show_trait.py
+++ b/gn2/tests/wqflask/show_trait/test_show_trait.py
@@ -53,7 +53,7 @@ def test_get_ncbi_summary_request(mocker):
"""}))
assert get_ncbi_summary(trait) == "this is a summary of the geneid"
mock_get.assert_called_once_with(
- "http://eutils.ncbi.nlm.nih.gov/entrez/"
+ "https://eutils.ncbi.nlm.nih.gov/entrez/"
"eutils/esummary.fcgi?db=gene&id="
f"{trait.geneid}&retmode=json"
)
diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py
index 3fbda913..b3bdde75 100644
--- a/gn2/wqflask/views.py
+++ b/gn2/wqflask/views.py
@@ -1195,7 +1195,7 @@ def get_probeset(name, dataset=None):
gene_id = gene_id.get("id").split("=")[-1]
result = json.loads(
requests.get(
- f"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gene&id={gene_id}&retmode=json"
+ f"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gene&id={gene_id}&retmode=json"
).content
)['result']
summary = result[gene_id]['summary']