Private
Public Access
1
0

adding apprimxate_rscore

This commit is contained in:
Sander Roosendaal
2021-05-03 11:04:27 +02:00
parent 7078842242
commit a379c92a9c
7 changed files with 158 additions and 79 deletions

View File

@@ -1912,6 +1912,24 @@ description: ""
response = download_fit(request,filename=self.ps_trimp.fitfile)
self.assertTrue('File not found' in context.exception)
@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_power(self,mockpost,mock_post,MockOAuth1Session):
self.ps_trimp.interval_string = '30min@200W'
self.ps_trimp.save()
self.assertEqual(self.ps_trimp.approximate_rscore,50)
@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_spm(self,mockpost,mock_post,MockOAuth1Session):
self.ps_trimp.interval_string = '60min@18spm'
self.ps_trimp.save()
self.assertEqual(self.ps_trimp.approximate_rscore,72)
def test_plannedsessions_dateform_view(self):
login = self.c.login(username=self.u.username, password=self.password)