Skip to content
This repository was archived by the owner on Aug 14, 2026. It is now read-only.

Commit 8ea6da1

Browse files
committed
test fixes
1 parent 3612bee commit 8ea6da1

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎tests/test_app.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def test_status_includes_weather(self, app_client):
149149
assert "weather" in data
150150
assert data["weather"]["enabled"] is True
151151
assert "skip_active" in data["weather"]
152-
assert "threshold_days" in data["weather"]
152+
assert "min_solar_threshold_kwh" in data["weather"]
153153

154154

155155
class TestInitWeatherClient:

‎tests/test_weather_client.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_get_forecast_onecall_success(self, mock_get):
8585
result = self.client.get_forecast()
8686

8787
assert result["success"] is True
88-
assert result["location"] == "Australia/Sydney"
88+
assert result["location"] == "Sydney, AU" # Uses city_name from client
8989
assert len(result["daily"]) == 2
9090
assert result["daily"][0]["condition"] == "Clear"
9191
assert result["daily"][1]["condition"] == "Rain"
@@ -128,7 +128,7 @@ def test_get_forecast_fallback_to_legacy(self, mock_get):
128128
result = self.client.get_forecast()
129129

130130
assert result["success"] is True
131-
assert result["location"] == "Sydney"
131+
assert result["location"] == "Sydney, AU" # Uses city_name from client
132132

133133
@patch('weather_client.requests.get')
134134
def test_get_forecast_uses_cache(self, mock_get):
@@ -175,7 +175,7 @@ def test_parse_onecall_forecast(self):
175175
result = self.client._parse_onecall_forecast(data)
176176

177177
assert result["success"] is True
178-
assert result["location"] == "Test/Zone"
178+
assert result["location"] == "Sydney, AU" # Uses city_name from client (fallback would be "Test/Zone")
179179
assert result["current"]["temp"] == 22.0
180180
assert len(result["daily"]) == 1
181181
assert result["daily"][0]["temp_min"] == 15.0
@@ -208,7 +208,7 @@ def test_parse_legacy_forecast(self):
208208
result = self.client._parse_legacy_forecast(data)
209209

210210
assert result["success"] is True
211-
assert result["location"] == "TestCity"
211+
assert result["location"] == "Sydney, AU" # Uses city_name from client (fallback would be "TestCity")
212212
assert len(result["daily"]) >= 1
213213

214214

0 commit comments

Comments
 (0)