def test_read_strava_basic_dataframe(dirpath, mocker):
    activity_json = os.path.join(dirpath, 'strava', 'activity.json')
    streams_json = os.path.join(dirpath, 'strava', 'streams.json')
    mocker.patch.object(ApiV3, 'get', return_value=MockResponse(activity_json).json())
    mocker.patch.object(Client, 'get_activity_streams', return_value=mock_get_activity_streams(streams_json))
    activity = read_strava(activity_id=4437021783, access_token=None, refresh_token=None, to_df=True)
    assert isinstance(activity, DataFrame)
    included_data = set(['latitude', 'longitude', 'altitude', 'distance', 'velocity_smooth', 'heartrate', 'cadence', 'moving', 'grade_smooth'])
    assert (included_data <= set(activity.columns.to_list()))
    assert (activity.size == 15723)
def test_read_strava_basic_dataframe(dirpath, mocker):
    activity_json = os.path.join(dirpath, 'strava', 'activity.json')
    streams_json = os.path.join(dirpath, 'strava', 'streams.json')
    mocker.patch.object(ApiV3, 'get', return_value=MockResponse(activity_json).json())
    mocker.patch.object(Client, 'get_activity_streams', return_value=mock_get_activity_streams(streams_json))
    activity = read_strava(activity_id=4437021783, access_token=None, refresh_token=None, to_df=True)
    assert isinstance(activity, DataFrame)
    included_data = set(['latitude', 'longitude', 'altitude', 'distance', 'velocity_smooth', 'heartrate', 'cadence', 'moving', 'grade_smooth'])
    assert (included_data <= set(activity.columns.to_list()))
    assert (activity.size == 15723)