Private
Public Access
1
0

fixing garmin sync

This commit is contained in:
Sander Roosendaal
2020-07-06 20:57:43 +02:00
parent 4ef98fec02
commit af1d241476
8 changed files with 39 additions and 6 deletions

View File

@@ -66,6 +66,20 @@ class GarminObjects(DjangoTestCase):
self.assertEqual(len(data),515)
def test_garmin_push_details4(self):
data = json.load(open('rowers/tests/testdata/garmindetail4.txt','r'))
response = self.c.post('/rowers/garmin/activities/',json.dumps(data),
content_type='application/json')
self.assertEqual(response.status_code, 200)
ws = Workout.objects.filter(user=self.r)
self.assertEqual(ws.count(),1)
data,w = dataprep.getrowdata_db(id=ws[0].id)
self.assertEqual(len(data),18)
def test_garmin_push_details2(self):
data = json.load(open('rowers/tests/testdata/garmindetail2.txt','r'))
response = self.c.post('/rowers/garmin/activities/',json.dumps(data),

View File

@@ -1,4 +1,4 @@
[ { "userId": "25858854-f086-4026-83ac-a3bfc97dcbb1",
{"activityDetails":[ { "userId": "25858854-f086-4026-83ac-a3bfc97dcbb1",
"userAccessToken": "dfdzf",
"summaryId" : "14098044-detail",
"summary" : {
@@ -72,3 +72,4 @@
"movingDurationInSeconds" : 0
} ]
} ]
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
rowers/tests/testdata/garminlog.log vendored Normal file

File diff suppressed because one or more lines are too long