more or less done
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user