fixing some tests
This commit is contained in:
@@ -188,6 +188,7 @@ def set_strava_athlete_id(user):
|
||||
# Get list of workouts available on Strava
|
||||
def get_strava_workout_list(user,limit_n=0):
|
||||
r = Rower.objects.get(user=user)
|
||||
|
||||
if (r.stravatoken == '') or (r.stravatoken is None):
|
||||
s = "Token doesn't exist. Need to authorize"
|
||||
return custom_exception_handler(401,s)
|
||||
|
||||
@@ -924,8 +924,9 @@ def mocked_requests(*args, **kwargs):
|
||||
"token_type": "Bearer",
|
||||
"access_token": "987654321234567898765432123456789",
|
||||
"refresh_token": "1234567898765432112345678987654321",
|
||||
"expires_at": arrow.now().timestamp+3600
|
||||
"expires_at": arrow.now().timestamp()+7200
|
||||
}
|
||||
print(arrow.now().timestamp()+3600)
|
||||
return MockResponse(json_data,200)
|
||||
|
||||
|
||||
|
||||
@@ -2198,7 +2198,7 @@ def rankings_view2(request,userid=0,
|
||||
wcdurations = []
|
||||
wcpower = []
|
||||
|
||||
lastupdated = "01-01-1900"
|
||||
lastupdated = "1900-01-01"
|
||||
userid = 0
|
||||
if 'options' in request.session:
|
||||
options = request.session['options']
|
||||
|
||||
@@ -1054,7 +1054,6 @@ def workout_stravaimport_view(request,message="",userid=0):
|
||||
r = getrequestrower(request,userid=userid)
|
||||
#if r.user != request.user:
|
||||
# messages.info(request,"You cannot import other people's workouts from Strava")
|
||||
|
||||
try:
|
||||
thetoken = strava_open(request.user)
|
||||
except NoTokenError:
|
||||
|
||||
Reference in New Issue
Block a user