File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -299,18 +299,15 @@ def test_fetch_activities_for_month_december(self):
299299 mock_client .get_activities_by_date .assert_called_once_with ("2021-12-01" , "2021-12-31" )
300300
301301 def test_fetch_activities_api_error (self ):
302- """Test handling of API errors during fetch ."""
302+ """Test that connection errors propagate so the worker can surface them ."""
303303 provider = GarminProvider ()
304304
305- # Mock client to raise a Garmin-specific exception
306305 mock_client = Mock ()
307306 mock_client .get_activities_by_date .side_effect = GarminConnectConnectionError ("API Error" )
308307 provider ._get_client = Mock (return_value = mock_client )
309308
310- result = provider .fetch_activities_for_month ("2021-01" )
311-
312- # Should return empty list on error
313- assert result == []
309+ with pytest .raises (GarminConnectConnectionError ):
310+ provider .fetch_activities_for_month ("2021-01" )
314311
315312
316313class TestGarminProviderGear :
You can’t perform that action at this time.
0 commit comments