File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,12 @@ def test_call_api(self):
2424
2525 def test_get_all_regions (self ):
2626 all_regions = self .regions .get_all_regions ()
27- sample_region = filter (lambda x : x .id == '515' , all_regions )[0 ]
27+ sample_region = next (
28+ region for region in all_regions
29+ if region .id == '515' )
2830 assert (sample_region .name == 'UK' )
2931 assert (sample_region .region == 'uk' )
30-
32+
3133 def test_get_raw_forecast (self ):
3234 sample_region = self .regions .get_all_regions ()[0 ]
3335 response = self .regions .get_raw_forecast (
@@ -38,4 +40,4 @@ def test_get_raw_forecast(self):
3840 forecast_periods = response ['FcstPeriods' ]['Period' ]
3941 forecast_ids = [period ['id' ] for period in forecast_periods ]
4042 expected_ids = ['day1to2' , 'day3to5' , 'day6to15' , 'day16to30' ]
41- assert (forecast_ids == expected_ids )
43+ assert (forecast_ids == expected_ids )
You can’t perform that action at this time.
0 commit comments