def load_forecasts(self): forecast = Forecast(self.lat, self.lon) self.hourly_forecast = json.dumps(forecast.load_hourly_forecast())
def test_weather_forecast_with_clouds_sky(): with open("tests/data/forecast.json") as opened_file: forecast_dict = json.loads(opened_file.read()) forecast = Forecast(None, None, forecast_dict) forecast_dict = forecast.load_hourly_forecast() assert forecast_dict[1528092000] == "clouds"