first changes
This commit is contained in:
@@ -49,7 +49,7 @@ for id, row in df.iterrows():
|
||||
viewstotest.append(tpl)
|
||||
|
||||
|
||||
plans = ['basic','plan','coach','pro']
|
||||
plans = ['basic','pro']
|
||||
|
||||
@override_settings(TESTING=True)
|
||||
class PermissionsViewTests(TestCase):
|
||||
@@ -61,7 +61,7 @@ class PermissionsViewTests(TestCase):
|
||||
rcoach = Rower.objects.create(user=ucoach,
|
||||
birthdate=faker.profile()['birthdate'],
|
||||
gdproptin=True, ftpset=True,surveydone=True,gdproptindate=timezone.now(),
|
||||
rowerplan='coach',clubsize=10)
|
||||
rowerplan='pro',clubsize=10)
|
||||
|
||||
ucoach_workouts = WorkoutFactory.create_batch(5, user=rcoach)
|
||||
coachinggroup = CoachingGroup.objects.create()
|
||||
@@ -83,7 +83,7 @@ class PermissionsViewTests(TestCase):
|
||||
rplan = Rower.objects.create(user=uplan,
|
||||
birthdate=faker.profile()['birthdate'],
|
||||
gdproptin=True, ftpset=True,surveydone=True,gdproptindate=timezone.now(),
|
||||
rowerplan='plan',clubsize=10)
|
||||
rowerplan='pro',clubsize=10)
|
||||
|
||||
uplan_workouts = WorkoutFactory.create_batch(5, user=rplan)
|
||||
rcoach.save()
|
||||
@@ -103,7 +103,7 @@ class PermissionsViewTests(TestCase):
|
||||
rplan2 = Rower.objects.create(user=uplan2,
|
||||
birthdate=faker.profile()['birthdate'],
|
||||
gdproptin=True, ftpset=True,surveydone=True,gdproptindate=timezone.now(),
|
||||
rowerplan='plan',clubsize=10)
|
||||
rowerplan='pro',clubsize=10)
|
||||
|
||||
uplan2_workouts = WorkoutFactory.create_batch(5, user=rplan2)
|
||||
rcoach.save()
|
||||
@@ -287,12 +287,6 @@ class PermissionsViewTests(TestCase):
|
||||
elif permissions['own'] == 'pro':
|
||||
thisuser = self.upro
|
||||
notuser = self.ubasic
|
||||
elif permissions['own'] == 'plan':
|
||||
thisuser = self.uplan
|
||||
notuser = self.upro
|
||||
elif permissions['own'] == 'coach':
|
||||
thisuser = self.ucoach
|
||||
notuser = self.uplan
|
||||
|
||||
|
||||
if permissions['workoutid']:
|
||||
@@ -370,14 +364,6 @@ class PermissionsViewTests(TestCase):
|
||||
thisuser = self.upro
|
||||
memberuser = self.uplan
|
||||
notuser = self.ubasic
|
||||
elif permissions['member'] == 'plan':
|
||||
thisuser = self.uplan
|
||||
memberuser = self.ubasic
|
||||
notuser = self.upro
|
||||
elif permissions['member'] == 'coach':
|
||||
thisuser = self.ucoach
|
||||
memberuser = self.uplan
|
||||
notuser = self.uplan
|
||||
|
||||
|
||||
if permissions['workoutid']:
|
||||
|
||||
@@ -33,7 +33,7 @@ class TrainingPlanTest(TestCase):
|
||||
gdproptin=True, ftpset=True,surveydone=True,
|
||||
defaulttimezone='US/Pacific',
|
||||
gdproptindate=timezone.now(),
|
||||
rowerplan='coach')
|
||||
rowerplan='pro')
|
||||
|
||||
self.c = Client()
|
||||
self.user_workouts = WorkoutFactory.create_batch(5, user=self.r)
|
||||
@@ -200,7 +200,7 @@ class SessionTemplateTest(TestCase):
|
||||
birthdate=faker.profile()['birthdate'],
|
||||
gdproptin=True, ftpset=True,surveydone=True,
|
||||
gdproptindate=timezone.now(),
|
||||
rowerplan='coach')
|
||||
rowerplan='pro')
|
||||
|
||||
self.c = Client()
|
||||
self.user_workouts = WorkoutFactory.create_batch(5, user=self.r)
|
||||
@@ -306,7 +306,7 @@ class SessionLinkTest(TestCase):
|
||||
birthdate=faker.profile()['birthdate'],
|
||||
gdproptin=True, ftpset=True,surveydone=True,
|
||||
gdproptindate=timezone.now(),
|
||||
rowerplan='coach')
|
||||
rowerplan='pro')
|
||||
|
||||
self.c = Client()
|
||||
self.user_workouts = WorkoutFactory.create_batch(5, user=self.r)
|
||||
@@ -551,7 +551,7 @@ class SessionCompleteTest(TestCase):
|
||||
birthdate=faker.profile()['birthdate'],
|
||||
gdproptin=True, ftpset=True,surveydone=True,
|
||||
gdproptindate=timezone.now(),
|
||||
rowerplan='coach')
|
||||
rowerplan='pro')
|
||||
|
||||
self.c = Client()
|
||||
|
||||
@@ -808,7 +808,7 @@ class ChallengeCompleteTest(TestCase):
|
||||
birthdate=faker.profile()['birthdate'],
|
||||
gdproptin=True, ftpset=True,surveydone=True,
|
||||
gdproptindate=timezone.now(),
|
||||
rowerplan='coach')
|
||||
rowerplan='pro')
|
||||
|
||||
self.c = Client()
|
||||
|
||||
@@ -1032,7 +1032,7 @@ class MandatoryTestCompleteTest(TestCase):
|
||||
birthdate=faker.profile()['birthdate'],
|
||||
gdproptin=True, ftpset=True,surveydone=True,
|
||||
gdproptindate=timezone.now(),
|
||||
rowerplan='coach')
|
||||
rowerplan='pro')
|
||||
|
||||
self.c = Client()
|
||||
|
||||
@@ -1246,7 +1246,7 @@ class PlannedSessionsView(TestCase):
|
||||
gdproptin=True, ftpset=True,surveydone=True,
|
||||
gdproptindate=timezone.now(),
|
||||
defaulttimezone='US/Pacific',
|
||||
rowerplan='coach')
|
||||
rowerplan='pro')
|
||||
self.r.save()
|
||||
self.c = Client()
|
||||
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
@@ -38,7 +38,7 @@
|
||||
50,56,otw_use_impeller,switch to impeller data,TRUE,403,basic,302,302,basic,403,302,coach,302,302,FALSE,FALSE,TRUE,TRUE,TRUE,
|
||||
51,57,otw_use_gps,switch to GPS data,TRUE,403,basic,302,302,basic,403,302,coach,302,302,FALSE,FALSE,TRUE,TRUE,TRUE,
|
||||
52,58,workout_toggle_ranking,toggle ranking,TRUE,302,basic,302,302,basic,403,302,coach,302,302,FALSE,FALSE,TRUE,TRUE,TRUE,
|
||||
53,59,team_workout_upload_view,upload workout for team member,TRUE,302,coach,200,302,FALSE,200,302,FALSE,200,302,FALSE,FALSE,FALSE,TRUE,TRUE,
|
||||
53,59,team_workout_upload_view,upload workout for team member,TRUE,302,pro,200,302,FALSE,200,302,FALSE,200,302,FALSE,FALSE,FALSE,TRUE,TRUE,
|
||||
54,60,workout_upload_view,upload a workout,TRUE,302,basic,200,302,FALSE,200,302,FALSE,200,302,FALSE,FALSE,FALSE,TRUE,TRUE,
|
||||
56,62,workout_forcecurve_view,force curve,TRUE,302,pro,200,302,pro,403,302,coach,200,302,FALSE,FALSE,TRUE,TRUE,TRUE,
|
||||
57,63,workout_unsubscribe_view,unsubscribe from comments,TRUE,302,basic,200,302,basic,200,302,basic,200,302,FALSE,FALSE,TRUE,TRUE,TRUE,
|
||||
@@ -159,12 +159,12 @@
|
||||
201,259,workout_workflow_view,workout workflow vieq,TRUE,302,basic,200,200,basic,200,200,coach,200,200,FALSE,FALSE,TRUE,TRUE,TRUE,
|
||||
202,260,workout_flexchart3_view,flex chart,TRUE,302,basic,200,403,basic,200,200,coach,200,200,FALSE,FALSE,TRUE,TRUE,TRUE,
|
||||
203,264,rower_process_testcallback,test callback,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
204,265,rower_create_trainingplan,create training plan,TRUE,302,plan,200,302,FALSE,403,403,FALSE,200,403,FALSE,FALSE,FALSE,TRUE,TRUE,
|
||||
204,265,rower_create_trainingplan,create training plan,TRUE,302,pro,200,302,FALSE,403,403,FALSE,200,403,FALSE,FALSE,FALSE,TRUE,TRUE,
|
||||
205,267,TrainingPlanDelete,delete training plan,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
206,268,MicroCycleDelete,delete training plan,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
207,269,MesoCycleDelete,delete training plan,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
208,270,MacroCycleDelete,delete training plan,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
209,271,rower_trainingplan_view,see training plan,TRUE,200,plan,200,302,plan,403,403,coach,200,403,FALSE,TRUE,FALSE,FALSE,FALSE,
|
||||
209,271,rower_trainingplan_view,see training plan,TRUE,200,pro,200,302,pro,403,403,coach,200,403,FALSE,TRUE,FALSE,FALSE,FALSE,
|
||||
210,279,rower_trainingplan_execution_view,see training plan execution,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
211,281,TrainingMacroCycleUpdate,update macro cycle,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
212,282,TrainingMesoCycleUpdate,update cycle,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
@@ -175,11 +175,11 @@
|
||||
217,289,TrainingPlanUpdate,update trainingplan,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
218,290,TrainingTargetUpdate,update training target,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
219,291,strokedataform,test strokedata,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
220,292,plannedsession_teamcreate_view,create planned session for team,TRUE,302,coach,200,302,FALSE,200,302,FALSE,200,302,FALSE,FALSE,FALSE,TRUE,TRUE,
|
||||
220,292,plannedsession_teamcreate_view,create planned session for team,TRUE,302,pro,200,302,FALSE,200,302,FALSE,200,302,FALSE,FALSE,FALSE,TRUE,TRUE,
|
||||
221,296,plannedsession_teamedit_view,edit planned sesssion,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
222,298,plannedsession_create_view,create planned session ,TRUE,302,plan,200,302,FALSE,200,302,coach,200,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
223,300,plannedsession_multiclone_view,clone multiple planned sessions,TRUE,302,plan,200,302,plan,403,403,coach,200,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
224,302,plannedsession_multicreate_view,create multiple planned sessions,TRUE,302,plan,200,302,plan,403,403,coach,200,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
222,298,plannedsession_create_view,create planned session ,TRUE,302,pro,200,302,FALSE,200,302,coach,200,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
223,300,plannedsession_multiclone_view,clone multiple planned sessions,TRUE,302,pro,200,302,pro,403,403,coach,200,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
224,302,plannedsession_multicreate_view,create multiple planned sessions,TRUE,302,pro,200,302,pro,403,403,coach,200,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
225,305,plannedsession_edit_view,edit planned sesssion,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
226,306,plannedsession_totemplate_view,planned session to template,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
227,307,plannedsession_compare_view,compare workouts from planned session,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
@@ -188,9 +188,9 @@
|
||||
230,313,plannedsession_detach_view,remove workout from session,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
231,315,plannedsession_view,view session,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
232,317,PlannedSessionDelete,delete session,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
233,319,plannedsessions_manage_view,manage planned sesions,TRUE,302,plan,200,302,plan,403,403,coach,200,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
233,319,plannedsessions_manage_view,manage planned sesions,TRUE,302,pro,200,302,pro,403,403,coach,200,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
234,323,plannedsessions_coach_view,team view,TRUE,302,basic,200,403,basic,403,403,coach,200,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
235,325,plannedsessions_coach_icsemail_view,team view,TRUE,302,coach,302,403,coach,302,403,coach,302,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
235,325,plannedsessions_coach_icsemail_view,team view,TRUE,302,pro,302,403,pro,302,403,coach,302,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
236,326,plannedsessions_print_view,print view,TRUE,302,basic,200,403,basic,403,403,coach,200,403,FALSE,TRUE,FALSE,TRUE,TRUE,
|
||||
237,327,plannedsession_comment_view,comment on planned session,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,FALSE,FALSE,FALSE,FALSE,
|
||||
238,330,plannedsessions_icsemail_view,send ICS email,TRUE,200,basic,200,302,basic,200,302,coach,200,302,FALSE,TRUE,FALSE,FALSE,FALSE,
|
||||
|
||||
|
Reference in New Issue
Block a user