Private
Public Access
1
0

committing survey

This commit is contained in:
Sander Roosendaal
2020-01-08 22:43:41 +01:00
parent cfc61e8621
commit 09a490c064
25 changed files with 572 additions and 597 deletions

View File

@@ -9,10 +9,10 @@ from .statements import *
class WorkoutViewTest(TestCase):
def setUp(self):
self.u = UserFactory()
self.r = Rower.objects.create(user=self.u,
birthdate=faker.profile()['birthdate'],
gdproptin=True,
gdproptin=True,surveydone=True,
gdproptindate=timezone.now(),
rowerplan='coach',
showfavoritechartnotes=True)
@@ -25,7 +25,7 @@ class WorkoutViewTest(TestCase):
self.u.save()
result = get_random_file(filename='rowers/tests/testdata/onwater2.csv')
self.wwater = WorkoutFactory(user=self.r,
csvfilename=result['filename'],
starttime=result['starttime'],
@@ -47,7 +47,7 @@ class WorkoutViewTest(TestCase):
)
result = get_random_file(filename='rowers/tests/testdata/erg1.csv')
self.werg1 = WorkoutFactory(user=self.r,
csvfilename=result['filename'],
starttime=result['starttime'],
@@ -58,7 +58,7 @@ class WorkoutViewTest(TestCase):
)
result = get_random_file(filename='rowers/tests/testdata/erg2.csv')
self.werg2 = WorkoutFactory(user=self.r,
csvfilename=result['filename'],
starttime=result['starttime'],
@@ -69,7 +69,7 @@ class WorkoutViewTest(TestCase):
)
result = get_random_file(filename='rowers/tests/testdata/erg3.csv')
self.werg3 = WorkoutFactory(user=self.r,
csvfilename=result['filename'],
starttime=result['starttime'],
@@ -98,7 +98,7 @@ class WorkoutViewTest(TestCase):
notes=faker.word(),
user=self.r
)
def tearDown(self):
pass
@@ -113,7 +113,7 @@ class WorkoutViewTest(TestCase):
response = self.c.get(url)
self.assertEqual(response.status_code,200)
# change chart
form_data = {
'xaxis':'time',
@@ -161,7 +161,7 @@ class WorkoutViewTest(TestCase):
response = self.c.get(url)
self.assertEqual(response.status_code,200)
# change chart
form_data = {
'xaxis':'time',
@@ -190,4 +190,4 @@ class WorkoutViewTest(TestCase):
}
response = self.c.post(url,form_data)
self.assertEqual(response.status_code,200)
self.assertEqual(response.status_code,200)