Skip to content

Commit

Permalink
test.test_api_client: fix shape of riverflood Austria, rcp26, 2010-2030
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuel-schmid committed Feb 2, 2022
1 parent c729650 commit ca76152
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions climada/test/test_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def test_get_hazard(self):
properties={'country_name': 'Austria',
'year_range': '2010_2030', 'climate_scenario': 'rcp26'},
dump_dir=DATA_DIR)
self.assertEqual(np.shape(hazard.intensity), (480, 5786))
self.assertEqual(np.shape(hazard.intensity), (1440, 5784))
self.assertEqual(np.unique(hazard.centroids.region_id), 40)
self.assertEqual(np.unique(hazard.date).size, 20)
self.assertEqual(hazard.tag.haz_type, 'RF')
Expand All @@ -148,7 +148,7 @@ def test_get_hazard_fails(self):
client = Client()
with self.assertRaises(ValueError) as cm:
client.get_hazard(hazard_type='litpop',
properties={'country_name': ['Switzerland', 'Austria'],
properties={'country_name': 'Austria',
'year_range': '2010_2030', 'climate_scenario': 'rcp26'},
dump_dir=DATA_DIR)
self.assertIn('Valid hazard types are a subset of CLIMADA hazard types. Currently',
Expand Down

0 comments on commit ca76152

Please sign in to comment.