isa-api icon indicating copy to clipboard operation
isa-api copied to clipboard

mock pubmed API call in test

Open proccaserra opened this issue 3 months ago • 0 comments

to avoid build failure as witnessed:

ERROR: test_get_pubmed_article (utils.test_isatools_utils.TestPubMedIDUtil)

Traceback (most recent call last): File "/home/runner/work/isa-api/isa-api/tests/utils/test_isatools_utils.py", line 172, in test_get_pubmed_article J = pubmed.get_pubmed_article('25520553') File "/home/runner/work/isa-api/isa-api/isatools/net/pubmed.py", line 23, in get_pubmed_article handle = Entrez.efetch(db="pubmed", id=pubmed_id.strip(), rettype="medline", retmode="text") File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/Bio/Entrez/init.py", line 197, in efetch return _open(request) File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/Bio/Entrez/init.py", line 623, in _open handle = urlopen(request) File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/urllib/request.py", line 216, in urlopen return opener.open(url, data, timeout) File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/urllib/request.py", line 525, in open response = meth(req, response) File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/urllib/request.py", line 634, in http_response response = self.parent.error( File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/urllib/request.py", line 563, in error return self._call_chain(*args) File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/urllib/request.py", line 496, in _call_chain result = func(*args) File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/urllib/request.py", line 643, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 502: Bad Gateway

proccaserra avatar Mar 25 '24 15:03 proccaserra