Private
Public Access
1
0

improved (fixed) rules and two additional tests for permissions

This commit is contained in:
Sander Roosendaal
2020-01-16 14:56:52 +01:00
parent 94b5e59100
commit c23fd15b7c
4 changed files with 180 additions and 17 deletions

View File

@@ -5,7 +5,17 @@ from __future__ import unicode_literals
#from __future__ import print_function
from .statements import *
nu = datetime.datetime.now()
nu = datetime.datetime.now()self.ucoach = UserFactory()
self.rcoach = Rower.objects.create(
user=self.ucoach,
birthdate=faker.profile()['birthdate'],
gdproptin=True,surveydone=True,
gdproptindate=timezone.now(),
rowerplan='coach'
)
self.ucoachpassword = faker.word()
self.uchoach.set_password(self.ucoachpassword)
self.ucoach.save()
from rowers.utils import allmonths,allsundays
import rowers.plannedsessions as plannedsessions
@@ -125,7 +135,6 @@ class TrainingPlanTest(TestCase):
for url in urls:
if 'planbyweeks' in url and not tested:
print(url)
response = self.c.get(url,follow=True)
self.assertEqual(response.status_code,200)
tested = True