Skip to content

Commit a5a3fef

Browse files
fix test_data_api
1 parent d8b8e9a commit a5a3fef

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

script/jenkins/test_data_api.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import numpy as np
2727
import pytest
28-
from pandas_datareader import wb
2928

3029
from climada import CONFIG
3130
from climada.entity.exposures.litpop.nightlight import BM_FILENAMES, download_nl_files
@@ -36,7 +35,11 @@
3635
download_icon_grib,
3736
)
3837
from climada.util.files_handler import download_file, download_ftp
39-
from climada.util.finance import WORLD_BANK_INC_GRP, WORLD_BANK_WEALTH_ACC
38+
from climada.util.finance import (
39+
WORLD_BANK_INC_GRP,
40+
WORLD_BANK_WEALTH_ACC,
41+
download_world_bank_indicator,
42+
)
4043

4144

4245
class TestDataAvail(unittest.TestCase):
@@ -75,7 +78,8 @@ def test_wb_lev_hist_pass(self):
7578

7679
def test_wb_api_pass(self):
7780
"""Test World Bank API"""
78-
wb.download(indicator="NY.GDP.MKTP.CD", country="CHE", start=1960, end=2030)
81+
download_world_bank_indicator(indicator="NY.GDP.MKTP.CD", country_code="CHE")
82+
# as this doesn't download to a file, there is nothing to unlink
7983

8084
def test_ne_api_pass(self):
8185
"""Test Natural Earth API"""

0 commit comments

Comments
 (0)