fixing tests
This commit is contained in:
@@ -14,6 +14,15 @@ def default(o): # pragma: no cover
|
||||
|
||||
from rowsandall_app.settings import NK_OAUTH_LOCATION
|
||||
|
||||
def dologging(s):
|
||||
tstamp = time.localtime()
|
||||
timestamp = time.strftime('%b-%d-%Y %H:%M:%S', tstamp)
|
||||
with open('debuglog.log','a') as f:
|
||||
f.write('\n')
|
||||
f.write(timestamp)
|
||||
f.write(' ')
|
||||
f.write(s)
|
||||
|
||||
# Send workout to TP
|
||||
@permission_required('workout.change_workout',fn=get_workout_by_opaqueid,raise_exception=True)
|
||||
def workout_tp_upload_view(request,id=0):
|
||||
@@ -188,6 +197,13 @@ def workout_c2_upload_view(request,id=0):
|
||||
w = get_workout(id)
|
||||
r = w.user
|
||||
|
||||
s = 'C2 Upload Workout starttime {startdatetime} timezone {timezone} user id {userid}'.format(
|
||||
startdatetime = w.startdatetime,
|
||||
timezone = w.timezone,
|
||||
userid = w.user.user.id
|
||||
)
|
||||
dologging(s)
|
||||
|
||||
try:
|
||||
message,c2id = c2stuff.workout_c2_upload(request.user,w)
|
||||
except NoTokenError: # pragma: no cover
|
||||
|
||||
Reference in New Issue
Block a user