示例#1
0
 def load_forecasts(self):
     forecast = Forecast(self.lat, self.lon)
     self.hourly_forecast = json.dumps(forecast.load_hourly_forecast())
示例#2
0
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"