Private
Public Access
1
0

adding functionality to comment on planned sessions and races

This commit is contained in:
Sander Roosendaal
2019-02-13 15:13:49 +01:00
parent da4d39709e
commit 3709ad7ccb
12 changed files with 305 additions and 10 deletions

View File

@@ -486,6 +486,25 @@ class SessionCompleteTest(TestCase):
self.assertEqual(verdict,'on target')
def test_session_comment(self):
login = self.c.login(username=self.u.username, password=self.password)
self.assertTrue(login)
url = reverse('plannedsession_comment_view',kwargs={'id':self.ps_rscore.id})
response = self.c.get(url)
self.assertEqual(response.status_code,200)
form_data = {
'comment': faker.text()
}
form = WorkoutCommentForm(form_data)
self.assertTrue(form.is_valid())
response = self.c.post(url,form_data,follow=True)
self.assertEqual(response.status_code,200)
def test_session1_exact_complete(self):