Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2021-12-17 10:58:17 +01:00
parent e1931065f9
commit 1c045f773a
6 changed files with 23 additions and 21 deletions

View File

@@ -285,7 +285,7 @@ def summaryfromsplitdata(splitdata,data,filename,sep='|',workouttype='rower'):
@app.task
def handle_request_post(url, data,debug=False, **kwargs):
def handle_request_post(url, data,debug=False, **kwargs): # pragma: no cover
response = requests.post(url,data)
return response.status_code
@@ -1369,7 +1369,8 @@ def handle_send_email_transaction(
@app.task
def handle_send_email_instantplan_notification(
username, useremail, amount, planname,startdate, enddate, **kwargs):
username, useremail, amount, planname,startdate, enddate, **kwargs
): # pragma: no cover
if 'debug' in kwargs: # pragma: no cover
debug = kwargs['debug']
@@ -1537,7 +1538,7 @@ def handle_sendemail_raceregistration(
def handle_sendemail_coursesucceed(
useremail, username, logfile, workoutid, **kwargs
):
): # pragma: no cover
if 'debug' in kwargs: # pragma: no cover
debug = kwargs['debug']
else:
@@ -3246,7 +3247,7 @@ def handle_c2_async_workout(alldata,userid,c2token,c2id,delaysec,defaulttimezone
splitdata = None
distance = data['distance']
try:
try: # pragma: no cover
rest_distance = data['rest_distance']
rest_time = data['rest_time']/10.
except KeyError:
@@ -3325,7 +3326,7 @@ def handle_c2_async_workout(alldata,userid,c2token,c2id,delaysec,defaulttimezone
#dologging('debuglog.log',json.dumps(s.json()))
try:
strokedata = pd.DataFrame.from_dict(s.json()['data'])
except AttributeError:
except AttributeError: # pragma: no cover
dologging('debuglog.log','No stroke data in stroke data')
return 0
@@ -3333,7 +3334,7 @@ def handle_c2_async_workout(alldata,userid,c2token,c2id,delaysec,defaulttimezone
res = make_cumvalues(0.1*strokedata['t'])
cum_time = res[0]
lapidx = res[1]
except KeyError:
except KeyError: # pragma: no cover
dologging('debuglog.log','No time values in stroke data')
return 0
@@ -3639,7 +3640,7 @@ def fetch_strava_workout(stravatoken,oauth_data,stravaid,csvfilename,userid,debu
'power':power,
'strokelength':strokelength,
})
except ValueError:
except ValueError: # pragma: no cover
return 0
try:
@@ -3654,7 +3655,7 @@ def fetch_strava_workout(stravatoken,oauth_data,stravaid,csvfilename,userid,debu
try:
if 'summary_polyline' in workoutsummary['map'] and workouttype=='rower': # pragma: no cover
workouttype = 'water'
except KeyError:
except KeyError: # pragma: no cover
pass
try: