Private
Public Access
1
0

first changes

This commit is contained in:
2024-12-30 12:44:24 +01:00
parent e059ce9340
commit 165b8e35e0
6 changed files with 61 additions and 91 deletions

View File

@@ -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']: