Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2021-05-24 20:54:24 +02:00
parent 447284a5d9
commit 4839b64975
5 changed files with 4 additions and 4 deletions

View File

@@ -963,7 +963,7 @@ def workout_c2_upload(user,w,asynchron=False):
'Content-Type': 'application/json'}
import urllib
url = "https://log.concept2.com/api/users/%s/results" % (c2userid)
if not asynchron:
if not asynchron: # pragma: no cover
response = requests.post(url,headers=headers,data=json.dumps(data,default=default))

View File

@@ -259,7 +259,7 @@ def createsporttracksworkoutdata(w):
# Obtain SportTracks Workout ID from the response returned on successful
# upload
def getidfromresponse(response):
def getidfromresponse(response): # pragma: no cover
t = response.json()
uri = t['uris'][0]
regex = '.*?sporttracks\.mobi\/api\/v2\/fitnessActivities/(\d+)\.json$'

View File

@@ -2827,7 +2827,7 @@ def handle_rp3_async_workout(userid,rp3token,rp3id,startdatetime,max_attempts,de
try:
workout_download_details = pd.json_normalize(response.json()['data']['download'])
except JSONDecodeError:
except JSONDecodeError: # pragma: no cover
return 0
if workout_download_details.iat[0,1] == 'ready':

View File

@@ -433,7 +433,7 @@ def deltatimeprint(d): # pragma: no cover
return strfdeltah(d)
@register.filter
def c2userid(user):
def c2userid(user): # pragma: no cover
try:
thetoken = c2_open(user)
except NoTokenError: # pragma: no cover

Binary file not shown.