def test_get_forecast_exception(): conn = sqlite3.connect('src/weather.db') cur = conn.cursor() forecaster = Forecaster('2019-05-04', '2019-04-21', 5) with pytest.raises(ForecasterException): forecaster.get_forecast(cur)
def test_get_forecast(): conn = sqlite3.connect('src/weather.db') cur = conn.cursor() forecaster = Forecaster('2019-05-01', '2019-04-21', 5) assert len(forecaster.get_forecast(cur)) > 0