Skip to content

Commit

Permalink
Remove DWD Radolan test files, use remote backed up files instead
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed Apr 27, 2021
1 parent f5cf170 commit 4dc00b0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
Binary file removed tests/provider/dwd/radar/radolan_daily_201908080050
Binary file not shown.
Binary file removed tests/provider/dwd/radar/radolan_hourly_201908080050
Binary file not shown.
23 changes: 19 additions & 4 deletions tests/provider/dwd/radar/test_api_historic.py
Expand Up @@ -9,6 +9,7 @@
import h5py
import pybufrkit
import pytest
import requests

from tests.provider.dwd.radar import (
station_reference_pattern_de,
Expand Down Expand Up @@ -91,8 +92,15 @@ def test_radar_request_radolan_cdc_historic_hourly_data():
start_date=datetime(year=2019, month=8, day=8, hour=0, minute=50, second=0),
)

with Path(HERE, "radolan_hourly_201908080050").open("rb") as f:
radolan_hourly = BytesIO(f.read())
radolan_hourly_backup_url = (
"https://github.com/earthobservations/testdata/raw/main/"
"opendata.dwd.de/climate_environment/CDC/grids_germany/"
"hourly/radolan/historical/bin/2019/radolan_hourly_201908080050"
)

payload = requests.get(radolan_hourly_backup_url)

radolan_hourly = BytesIO(payload.content)

radolan_hourly_test = next(request.query()).data

Expand All @@ -119,8 +127,15 @@ def test_radar_request_radolan_cdc_historic_daily_data():
start_date=datetime(year=2019, month=8, day=8, hour=0, minute=50, second=0),
)

with Path(HERE, "radolan_daily_201908080050").open("rb") as f:
radolan_hourly = BytesIO(f.read())
radolan_daily_backup_url = (
"https://github.com/earthobservations/testdata/raw/main/"
"opendata.dwd.de/climate_environment/CDC/grids_germany/"
"daily/radolan/historical/bin/2019/radolan_daily_201908080050"
)

payload = requests.get(radolan_daily_backup_url)

radolan_hourly = BytesIO(payload.content)

radolan_hourly_test = next(request.query()).data

Expand Down

0 comments on commit 4dc00b0

Please sign in to comment.