bug fixes - loading nonexisting workout
This commit is contained in:
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user