Private
Public Access
1
0

bug fixes - loading nonexisting workout

This commit is contained in:
Sander Roosendaal
2017-02-13 22:32:05 +01:00
parent 4adccd508c
commit 4d7006922e
5 changed files with 195 additions and 48 deletions

View File

@@ -64,6 +64,27 @@ class C2Objects(DjangoTestCase):
res = add_workout_from_strokedata(u,1,data,strokedata,source='c2')
def test_strokedatanohr(self):
with open('rowers/testdata/c2strokedatanohr.txt','r') as infile:
res = json.load(infile)
strokedata = pd.DataFrame.from_dict(res['data'])
with open('rowers/testdata/c2testdata.txt','r') as infile:
res = json.load(infile)
data = res['data']
from rowers.views import add_workout_from_strokedata
u = User.objects.create_user('john',
'sander@ds.ds',
'koeinsloot')
r = Rower.objects.create(user=u)
res = add_workout_from_strokedata(u,1,data,strokedata,source='c2')
class StravaObjects(DjangoTestCase):
def test_strokedata(self):
timejson = json.load(open('rowers/testdata/stravatimetestdata.txt','r'))