Private
Public Access
1
0

more or less done

This commit is contained in:
2024-12-05 21:05:42 +01:00
parent 13effe6cce
commit 4d8aad12af
8 changed files with 154 additions and 12 deletions

View File

@@ -441,6 +441,12 @@ class StravaPrivacy(TestCase):
self.assertEqual(response.status_code,200)
# count number of workouts by counting the number of occurences of '<label for="id_workouts_xx">' in response.content where xx is a number
# print all lines of response.content that contain '<label for="id_workouts_'
#print([line for line in response.content.decode('utf-8').split('\n') if '<label for="id_workouts_' in line])
#print(form_data['workouts'])
self.assertEqual(response.content.count(b'<label for="id_workouts_'),2)
# get data from histodata function
ws = Workout.objects.filter(user=self.r)
@@ -455,13 +461,6 @@ class StravaPrivacy(TestCase):
self.assertEqual(data.count(','),2062)
# try and fail to submit a workout with workoutsource = strava to a challenge
class OwnApi(TestCase):
def setUp(self):
self.u = UserFactory()