Private
Public Access
1
0

plans dedicated to rowers if possible

This commit is contained in:
Sander Roosendaal
2021-05-03 15:32:50 +02:00
parent f7a585adb9
commit 04cfc2d915
3 changed files with 51 additions and 20 deletions

View File

@@ -1931,6 +1931,25 @@ description: ""
self.assertEqual(self.ps_trimp.approximate_rscore,72)
@patch('rowers.garmin_stuff.requests.post', side_effect=mocked_requests)
@patch('rowers.utils.requests.post', side_effect=mocked_requests)
@patch('rowers.garmin_stuff.OAuth1Session', side_effect=MockOAuth1Session)
def test_plannedsession_steps_distance(self,mockpost,mock_post,MockOAuth1Session):
self.ps_trimp.interval_string = '10km'
self.ps_trimp.save()
self.assertEqual(self.ps_trimp.approximate_rscore,52)
@patch('rowers.garmin_stuff.requests.post', side_effect=mocked_requests)
@patch('rowers.utils.requests.post', side_effect=mocked_requests)
@patch('rowers.garmin_stuff.OAuth1Session', side_effect=MockOAuth1Session)
def test_plannedsession_steps_time(self,mockpost,mock_post,MockOAuth1Session):
self.ps_trimp.interval_string = '60min'
self.ps_trimp.save()
self.assertEqual(self.ps_trimp.approximate_rscore,60)
def test_plannedsessions_dateform_view(self):
login = self.c.login(username=self.u.username, password=self.password)
self.assertTrue(login)