Exemple #1
0
def test_load_strava_tracks_with_str_activity_type_filter(
    loader: TrackLoader,
    strava_config_with_run_type_filter: str,
    mock_track_instance: MagicMock,
    mock_run_activity: MagicMock,
) -> None:
    loader.load_strava_tracks(strava_config_with_run_type_filter)

    mock_track_instance.load_strava.assert_called_once_with(mock_run_activity)
Exemple #2
0
def test_load_strava_tracks_with_list_activity_type_filter(
    loader: TrackLoader,
    strava_config_with_walk_hike_type_filter: str,
    mock_track_instance: MagicMock,
    mock_walk_activity: MagicMock,
    mock_hike_activity: MagicMock,
) -> None:
    loader.load_strava_tracks(strava_config_with_walk_hike_type_filter)

    mock_track_instance.load_strava.assert_any_call(mock_walk_activity)
    mock_track_instance.load_strava.assert_any_call(mock_hike_activity)