Skip to content

Commit 4eecea1

Browse files
feat: weather forecast - add API mocking & improve coverage
1 parent fd52f2f commit 4eecea1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/routers/weather_forecast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ def get_forecast_weather(input_date, location):
123123
input_query_string["location"] = location
124124
api_json, error_text = get_data_from_weather_api(FORECAST_URL,
125125
input_query_string)
126-
location_found = list(api_json.keys())[0]
127126
if not api_json:
128127
return None, error_text
128+
location_found = list(api_json.keys())[0]
129129
for i in range(len(api_json[location_found]['values'])):
130130
# find relevant date from API output
131131
if str(input_date) ==\

0 commit comments

Comments
 (0)