Skip to content

Commit 4c8da61

Browse files
author
ExpDev07
committed
fix tests (2)
1 parent a28828e commit 4c8da61

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

tests/example_data/time_series_19-covid-Time_series_covid19_confirmed_global.csv renamed to tests/example_data/time_series_covid19_confirmed_global.csv

File renamed without changes.

tests/example_data/time_series_19-covid-Time_series_covid19_deaths_global.csv renamed to tests/example_data/time_series_covid19_deaths_global.csv

File renamed without changes.

tests/test_jhu.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@ def read_file(self, state):
2424
"""
2525
Mock HTTP GET-method and return text from file
2626
"""
27-
filepath = "tests/example_data/time_series_19-covid-{}.csv".format(state)
27+
state = state.lowered()
28+
29+
# Determine filepath.
30+
filepath = "tests/example_data/time_series_19-covid-Time_series_covid19_{}_global.csv".format(state.lower())
31+
32+
if state == 'recovered':
33+
filepath = 'tests/example_data/time_series_19-covid-Recovered.csv'
34+
35+
# Return fake response.
2836
print("Try to read {}".format(filepath))
2937
with open(filepath, "r") as file:
3038
return file.read()

0 commit comments

Comments
 (0)